You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, I know that this could probably be a little bit outside the scope of ANSI-coloring-plugin but I also know that's the best place to meet with others that do share the same need: making Jenkins logs readable, and coloring is probably the best way to do it.
For example I do have about 10 complex regex partterns in iTerm2 which are re-coloring the terminal output. Mainly they detect lines that contain errors, warnings, debug info and they change their colors based on this. Is not perfect but it works very well on manually run commands or even while tailing the logs.
Now, I clearly cannot do the same with jenkins console and I am wondering which approach should be better: find a tool on the client that would act as a wrapper for the executed command or allow ANSIColor plugin (or another one) to do this parsing. Ideally it should be possible to disable any pattern matching if the line already contains some ANSI codes.
I will give few examples here, in case someone else would find them useful
^.*(\[*(warning|WARN|warn|Warning|WARNING).*)$
^.*((INFO|TASK)[\s\t]?.*)$
^(#|* |INFO|notice|remote|hint|debug1|debug2|debug3).*
^(error|fatal|abort|E):.*
# debug
^.*([\[\s]+(DEBUG)[:]?.*)
# dark grey (bash verbose lines)
^\+.*
# special trigger which triggers a terminal notification (ansible playbook ends)
PLAY RECAP \*\*\*
The text was updated successfully, but these errors were encountered:
I think I came across the same need.
From jenkins, I run an sh command sh doSomething
This command output �[33m�[1mDone�[22m�[39m
In a normal bash. I can see the colors. But not in the jenkins console, even when using ansicolor-plugin
In Jenkins, I see the text with the colors code (exactly as displayed above).
Is there a way to parse the stdout and apply the colors to it ?
Quick update:
We got a new jenkins server (2.150.1) and with ansiColor 0.6.0 it works like a charm. I can see the colors emitted by the bash...
Now I am thinking: Maybe it was a miss-configuration: something like wrong encoding when reading stdout...
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Yes, I know that this could probably be a little bit outside the scope of ANSI-coloring-plugin but I also know that's the best place to meet with others that do share the same need: making Jenkins logs readable, and coloring is probably the best way to do it.
For example I do have about 10 complex regex partterns in iTerm2 which are re-coloring the terminal output. Mainly they detect lines that contain errors, warnings, debug info and they change their colors based on this. Is not perfect but it works very well on manually run commands or even while tailing the logs.
Now, I clearly cannot do the same with jenkins console and I am wondering which approach should be better: find a tool on the client that would act as a wrapper for the executed command or allow ANSIColor plugin (or another one) to do this parsing. Ideally it should be possible to disable any pattern matching if the line already contains some ANSI codes.
I will give few examples here, in case someone else would find them useful
The text was updated successfully, but these errors were encountered: