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

CsvLogEventLayout NanoTime timestamp is always zero.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.4
    • None
    • Layouts
    • None

    Description

      CsvLogEventLayout generates NanoTime timestamps but these are always zero.
      To fix this, add the below code to the CsvLogEventLayout constructor:

            // LOG4J2-1074 Switch to actual clock if nanosecond timestamps are required in config.
            // LoggerContext will notify known NanoClockFactory users that the configuration has changed.
            NanoClockFactory.setMode(NanoClockFactory.Mode.System);
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: