How to highlight errors and warnings in the build log?


how can I highlight some lines in the build log automatically ?

The configuration would look like:
"Error\[.*\]" -> Highlight and count as error (red) (optionally make the build fail)
"Warning\[.*\]" -> Highlight and count as warning
"Generated successfully" -> Highlight in green and make bold

I am aware of the possibilities documented here:

But this requires writting an external script to parse the log file and produce the format expected by TeamCity. Furthermore it doesn't allow pure visual highlighting.

A similar feature is available as a Jenkins plugin:

Is there a way to do this in TeamCity ?
Is there a relate feature request ?



Comment actions Permalink

If you want to fail build on appearance of some messages in build log, you can use corresponding build failure condition:

All messages written to stderr become warnings in the log automatically. But there is no easy way to highlight messages with help of regexps. The only way to do so is to parse output in build script itself and produce corresponding service messages.

Comment actions Permalink

Too bad. Thanks for the answer !


Please sign in to leave a comment.