-
Improvement
-
Resolution: Cannot Reproduce
-
Minor
-
None
Yah, I don't know; is this one issue or two? The console log parser (Parsed Console Output) will show the lines from the log with whitespace compressed – that is to say, multiple spaces turned into single spaces. Is this desirable or undesirable? Well, it makes the text fit in the window better. Nonetheless, it can make it a challenge to create a regular expression that matches the line in the log when you don't know that the console log parser plug-in is doing that.
How about the following idea for a user interface:
Allowing the user to select lines in the log and work with them. A mouse-over dialog could present the user with a reg-ex that matches that line in the log. It could be shown in the form of: ok /goop/
The regex would need to handle slashes and other punctuation, whitespace, and numbers.
For example, a log line such as
[concat] Warning, Line 0: File format/version not recognized, defaulting to BOB v2.5
could be converted into
ok /.concat.[ ]+Warning.[ ]+Line[ ]+[0-9]+.[ ]+File format.version not recognized. defaulting to BOB v[0-9]+.[0-9]+/
You get the idea?
This would assist users having difficulty writing regular expressions, but also just assist rule debugging in general. See for example JENKINS-9568
For bonus points, you could allow the user to change the regex and tell him if it still matches that line in the log.
Or, you could just throw away these ideas and document that the Parsed Console Output has compressed whitespace and what to do about it.
I checked out this plugin, wrapped the content written to log_content.html in <pre class="console-output"></pre> (like the regular console output is), and removed the <br>\n added to the end of each parsed line. I can share a patch if it would help get this updated. I find it much easier to read the parsed output this way as it looks essentially the same as in the regular console output but with some additional color.