-
Bug
-
Resolution: Not A Defect
-
Major
-
Windows XP
Hello,
I’m using the Warnings plugin (version 4.23) and I’m trying to parse a bunch of log files generated by an in-house tool that look like the following example “scen_Rollcontrol.prop.txt.log”. Note that one build generates a bunch of log files and I need to collect all the warnings/errors contained in all the log files of the current build.
Here is the content of one log file:
ADEPAUTO (CLI) v2.0.3 running on Java 1.7.0_09-b05 Signals definition context: [-Inf - +Inf] ** Scade ** SCENARIO -> ERROR: Not verified in true context [0.2 - 8.1] at time [0.2 - 8.1] : Rollcontrol Manoeuvre -> Not verified in true context [0.2 - 8.1] at time [0.2 - 8.1] : <Alarm_roll_rate_15.0> Conditions initiales : - Contexte : [0 - 15.6] P1 [0.2 - 8.1] => ERROR: Not verified in true context [0.2 - 8.1] at time [0.2 - 8.1] Manoeuvre -> OK : <Alarm_roll_rate_-15.0> Conditions initiales : - Contexte : [0 - 15.6] P1 [8.2 - 12.1] => OK Manoeuvre -> OK : <Rollmode_nominal> Conditions initiales : - Contexte : [0 - 15.6] P1 [12.2 - 14.1] U [14.7 - 15.1] => OK Manoeuvre -> OK : <Rollmode_off> Conditions initiales : - Contexte : [0 - 15.6] P1 [2.2 - 3.1] U [6.2 - 7.1] U [10.2 - 11.1] => OK
The problem is that there is no filename in the text above, the filename I’d like to collect is the actual file name of the log file being analyzed. Similarly, the line I’d like to show in Jenkins is the actual line where “Manoeuvre -> Not verified” appears in the log file.
Is there any way I can configure the Warnings plugin to do that i.e. provide filename and linenumber to the Warning declaration in the Groovy Mapping Script ?
Thank you in advance.
Yes that is possible. Just set the filename to the absolute path of your file after you created the warning in your script.