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

(Question) Jenkins logs in UTC since 2.177

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      In the past I had configured Jenkins log format via Java system property, this is starting from Jenkins v2.177 thanks to https://github.com/jenkinsci/winstone/pull/63 no more necessary (and also no more taken into account or overridden – which is OK).

      Turning now to my question, however: I was wondering, if hard-coding the timezone for Jenkins server logs to UTC is really on purpose or not, or is good or bad? (cf. https://github.com/jenkinsci/support-core-plugin/commit/8f35dd1ad5e0c5e498e5579bcf6671f11bf6d3c7#diff-046257f44dc4c390341c1e16a4b4e42c)
      Of course it only makes a difference for humans looking at the log lines, because any log analysis software or central logging will convert it correctly anyhow.
      And frankly I also have no proper opinion on whether this is good or bad: I just noticed the difference and was irritated...

        Attachments

          Activity

          Hide
          jglick Jesse Glick added a comment -

          Timestamps in logs are best left in UTC.

          Show
          jglick Jesse Glick added a comment - Timestamps in logs are best left in UTC.
          Hide
          timblaktu Tim Black added a comment - - edited

          Jesse Glick can you briefly elaborate on why? I cannot see the difficulty or problem why Jenkins cannot use the timezone set in the OS. Like Reinhold Füreder, I would like to see the logs in local time just for my convenience. Everything else in Jenkins appear to be observing the timezone I set using `-Dorg.apache.commons.jelly.tags.fmt.timeZone`.

          Show
          timblaktu Tim Black added a comment - - edited Jesse Glick can you briefly elaborate on why? I cannot see the difficulty or problem why Jenkins cannot use the timezone set in the OS. Like Reinhold Füreder , I would like to see the logs in local time just for my convenience. Everything else in Jenkins appear to be observing the timezone I set using `-Dorg.apache.commons.jelly.tags.fmt.timeZone`.
          Hide
          jglick Jesse Glick added a comment -

          If anyone else ever needs to look at logs, it is simpler if UTC is used everywhere. This is just picked up from the lib-support-log-formatter. You can override the log format to something else if you care.

          Show
          jglick Jesse Glick added a comment - If anyone else ever needs to look at logs, it is simpler if UTC is used everywhere. This is just picked up from the lib-support-log-formatter . You can override the log format to something else if you care.

            People

            Assignee:
            jglick Jesse Glick
            Reporter:
            reinholdfuereder Reinhold Füreder
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: