With 1.2.4 the Logger color works fine in Jenkins and Terminal.
Updating to 1.3.1 the Logger color works in Terminal, but it doesn't work in Jenkins.
In 1.2.4:

In 1.3.1:

Jenkins ver. 2.190.3
AnsiColor 0.6.2 (Jenkins plugin)
| Executable | Version |
| ---: | :--- |
| nightwatch --version | nightwatch v1.3.1 |
| npm --version | 6.12.1 |
| yarn --version | --- |
| node --version | v12.13.1 |
| Browser driver | Version |
| --- | --- |
| chromedriver | ChromeDriver 78.0.3904.70 |
| OS | Version |
| --- | --- |
| macOS Catalina | 10.15.1 (19B88) |
| Ubuntu | Ubuntu 18.04.3 LTS |
Jenkinsfile fragment:
stage ('test') {
steps {
ansiColor('xterm') {
sh 'npm test'
}
}
}
Do you need colors in CI?
Not critical, low priority. It helps to review big logs.
I thought that the ANSI color codes would create problems when reviewing logs in CI. This is why we have added the option to disable colors in the first place and we've seen many people reviewing CI logs with ANSI codes making quite difficult to see what's going on. So this change is intentional, it's supposed to be helpful :), but of course we can review it if it creates more problems than it solves.
Ok, thank you!
On Jenkins it works fine with ansiColor plugin: https://github.com/jenkinsci/ansicolor-plugin
steps {
ansiColor('xterm') {
sh 'npm test'
}
}
I would also like to have it back. Maybe via a configuration parameter. Thanks :)
+1
Would be very useful to get this back too, agreed via a config of some sort.
Can only go as far as 1.2.4 due to this.
This issue has been automatically marked as stale because it has not had any recent activity.
If possible, please retry using the latest Nightwatch version and update the issue with any relevant details. If no further activity occurs, it will be closed. Thank you for your contribution.
Same issue with GitLab CI. Most command line tools disable the colors when the output is not a terminal and allow to force the colors with a command line options, nightwatch should do the same.
@jazzzz have you tried 1.3.5?
@jazzzz have you tried 1.3.5?
Yes, it works on GitLab CI, but it's strange to have no choice other than having colors when piping to a file.
Most helpful comment
Ok, thank you!
On Jenkins it works fine with
ansiColorplugin: https://github.com/jenkinsci/ansicolor-plugin