Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-1248

PatternLayout Nano timestamp does not work

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5
    • 2.6
    • Layouts, Pattern Converters
    • None

    Description

      As reported by jiri463 on StackOverflow, specifying %nano in a pattern layout always renders zero values instead of the expected nanotime.


      Note for StackOverflow users: this ticket refers to the %nano conversion pattern in pattern layout, which displays the result of System.nanotime().

      This function is not related to the %date date pattern with microsecond or nanosecond precision that was introduced in Log4j 2.11.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rpopma Remko Popma
            rpopma Remko Popma
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment