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

Add a logformat token for nanotime

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.4
    • None
    • None

    Description

      Add a token in the log format specifier to output the current value of System.nanotime().

      We are currently adding the nanotime value to our log messages manually, which we find very useful for troubleshooting unexpected latency, and as a quick-and-dirty data source to feed into performance analysis tools.

      It would be very nice if Log4j could do this for us. It would also be nice to have this in the log format specified, so we can turn it on/off at runtime by editing the Log4j config file.

      Attachments

        Issue Links

          Activity

            People

              rpopma Remko Popma
              willhains Will Hains
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: