Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39079

Record timestamps for pipeline jobs without filling the log file with console notes

    Details

    • Type: New Feature
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: timestamper-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.7.4
      Timestamp plugin 1.8.7
    • Similar Issues:

      Description

      Although the source documentation indicates otherwise, it appears that the encoded timestamps are always being inserted directly into the console log files leading to difficulty parsing files from disk.

      /**
       * Time-stamp console note.
       * <p>
       * These are inserted into the log file when:
       * <ul>
       * <li>The build does not extend {@link AbstractBuild}, e.g. a pipeline job.</li>
       * <li>Running the Timestamper plugin prior to version 1.4.</li>
       * <li>The system property is set: ({@link #getSystemProperty()}). The is
       * intended to support scripts that were written prior to Timestamper 1.4 to
       * parse the log files. New scripts should query the {@code /timestamps} URL
       * instead (see {@link TimestampsAction}).</li>
       * </ul>
       * <p>
       * Otherwise, the time-stamps are stored in a separate file, which allows a more
       * compact format to be used and avoids filling the log files with encoded
       * console notes.
       * 
       * @author Steven G. Brown
       */
      

      Seem to indicate that a pipeline job using recent versions of the plugin should not have this issue. But the system property is checked as a boolean and since TimeStampNote.getSystemProperty() always returns a string its always true.

        Attachments

          Issue Links

            Activity

            Hide
            stevengbrown Steven G Brown added a comment - - edited

            Pipeline jobs do not extend AbstractBuild and so they rely on console notes to work. I've tried to clarify the documentation here: 70f165c.

            I'd love to have the pipeline builds working without filling the log file with console notes, but no-one has implemented that yet.

            But the system property is checked as a boolean and since TimeStampNote.getSystemProperty() always returns a string its always true.

            No, it looks up the system property with that name. Have a look at the Javadoc for Boolean.getBoolean(String).

            Show
            stevengbrown Steven G Brown added a comment - - edited Pipeline jobs do not extend AbstractBuild and so they rely on console notes to work. I've tried to clarify the documentation here: 70f165c . I'd love to have the pipeline builds working without filling the log file with console notes, but no-one has implemented that yet. But the system property is checked as a boolean and since TimeStampNote.getSystemProperty() always returns a string its always true. No, it looks up the system property with that name. Have a look at the Javadoc for Boolean.getBoolean(String) .
            Hide
            stevengbrown Steven G Brown added a comment -

            Would also fix JENKINS-45683

            Show
            stevengbrown Steven G Brown added a comment - Would also fix JENKINS-45683
            Hide
            trejkaz trejkaz added a comment -

            Wondering whether the size of the entries it's writing into the log could at least be reduced. For us, it's adding about 320 bytes per log line, and makes the logs so much bigger that builds are occasionally failing because the master can't cope with all the additional log data.

            Show
            trejkaz trejkaz added a comment - Wondering whether the size of the entries it's writing into the log could at least be reduced. For us, it's adding about 320 bytes per log line, and makes the logs so much bigger that builds are occasionally failing because the master can't cope with all the additional log data.

              People

              • Assignee:
                Unassigned
                Reporter:
                jwelch92 jared welch
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: