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

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

    • Icon: New Feature New Feature
    • Resolution: Duplicate
    • Icon: Minor Minor
    • timestamper-plugin
    • None
    • Jenkins 2.7.4
      Timestamp plugin 1.8.7

      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.

          [JENKINS-39079] Record timestamps for pipeline jobs without filling the log file with console notes

          jared welch created issue -
          Steven G Brown made changes -
          Assignee Original: Steven G Brown [ stevengbrown ]
          Description Original: 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.

          {code}
          /**
           * 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
           */
          {code} 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 TimeStampNonte.getSystemProperty() always returns a string its always true.
          New: 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.

          {code}
          /**
           * 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
           */
          {code}

          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.
          Issue Type Original: Bug [ 1 ] New: New Feature [ 2 ]
          Steven G Brown made changes -
          Summary Original: Timestamper plugin inserts encoded TimeStampNote when using in pipeline job New: Record timestamps for pipeline jobs without filling the log file with console notes
          Steven G Brown made changes -
          Link New: This issue is related to JENKINS-45683 [ JENKINS-45683 ]
          Jesse Glick made changes -
          Link New: This issue duplicates JENKINS-48344 [ JENKINS-48344 ]
          Jesse Glick made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            Unassigned Unassigned
            jwelch92 jared welch
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: