Steps to reproduce 1. Install timestamper 1.9 and ansicolor 0.6.2. 2. Set the global option to enable timestamps for all Pipeline builds. 3. Create a job with a console log as follows, and view the console in the classic UI.
[2019-06-18T19:59:27.250Z] ^[[32mDone resetting Postgres targets^[[39m
[2019-06-18T19:59:27.250Z] ^[[34m# vm.example.com:
[2019-06-18T19:59:27.250Z] Could not fetch logs: Error while executing command: "awk 'BEGIN { CAPTURE="Could not fetch logs: Error while executing command: "grep -c "Starting initial_setup_tests.test_developer_reset_system" /var/log/error.log" Exit status: 1" }; CAPTURE==0 { if (lines > 0){print; lines-- }}; /"Starting initial_setup_tests.test_developer_reset_system"/ { CAPTURE--; lines=200}' /var/log/error.log" Exit status: 1# dlpx-trunk-84487-target.dlpxdc.co:
[2019-06-18T19:59:27.250Z] Could not fetch logs: Error while executing command: "awk 'BEGIN { CAPTURE="Could not fetch logs: Error while executing command: "grep -c "Starting initial_setup_tests.test_developer_reset_system" /var/log/error.log" Exit status: 1" }; CAPTURE==0 { if (lines > 0){print; lines-- }}; /"Starting initial_setup_tests.test_developer_reset_system"/ { CAPTURE--; lines=200}' /var/log/error.log" Exit status: 1
[2019-06-18T19:59:27.250Z] ^[[39m
[2019-06-18T19:59:27.931Z] ^[[32mHTTP CONNECTION: vm.example.com/resources/json/session^[[39m
Expected results GlobalAnnotator should mark up the timestamps for all lines as follows:
12:59:27 Done resetting Postgres targets
12:59:27 # vm.example.com:
12:59:27 Could not fetch logs: Error while executing command: "awk 'BEGIN { CAPTURE="Could not fetch logs: Error while executing command: "grep -c "Starting initial_setup_tests.test_developer_reset_system" /var/log/error.log" Exit status: 1" }; CAPTURE==0 { if (lines > 0){print; lines-- }}; /"Starting initial_setup_tests.test_developer_reset_system"/ { CAPTURE--; lines=200}' /var/log/error.log" Exit status: 1# dlpx-trunk-84487-target.dlpxdc.co:
12:59:27 Could not fetch logs: Error while executing command: "awk 'BEGIN { CAPTURE="Could not fetch logs: Error while executing command: "grep -c "Starting initial_setup_tests.test_developer_reset_system" /var/log/error.log" Exit status: 1" }; CAPTURE==0 { if (lines > 0){print; lines-- }}; /"Starting initial_setup_tests.test_developer_reset_system"/ { CAPTURE--; lines=200}' /var/log/error.log" Exit status: 1
12:59:27
12:59:27 HTTP CONNECTION: vm.example.com/resources/json/session
Actual results GlobalAnnotator marks up the first two lines and the and last line, but the three lines in the middle are not annotated:
12:59:27 Done resetting Postgres targets
12:59:27 # vm.example.com:
[2019-06-18T19:59:27.250Z] Could not fetch logs: Error while executing command: "awk 'BEGIN { CAPTURE="Could not fetch logs: Error while executing command: "grep -c "Starting initial_setup_tests.test_developer_reset_system" /var/log/error.log" Exit status: 1" }; CAPTURE==0 { if (lines > 0){print; lines-- }}; /"Starting initial_setup_tests.test_developer_reset_system"/ { CAPTURE--; lines=200}' /var/log/error.log" Exit status: 1# dlpx-trunk-84487-target.dlpxdc.co:
[2019-06-18T19:59:27.250Z] Could not fetch logs: Error while executing command: "awk 'BEGIN { CAPTURE="Could not fetch logs: Error while executing command: "grep -c "Starting initial_setup_tests.test_developer_reset_system" /var/log/error.log" Exit status: 1" }; CAPTURE==0 { if (lines > 0){print; lines-- }}; /"Starting initial_setup_tests.test_developer_reset_system"/ { CAPTURE--; lines=200}' /var/log/error.log" Exit status: 1
[2019-06-18T19:59:27.250Z]
12:59:27 HTTP CONNECTION: vm.example.com/resources/json/session
Note that the three lines in the middle are part of a multi-line color sequence. |