Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-4217

add log severity and component name to the log message

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.5
    • Component/s: Logging
    • Labels:
    • Sprint:
      Server 2.7.4, Server 2.7.5
    • Case:
    • Linked BF Score:
      0

      Description

      New format:

      Log severity is logged with a single capital letter.
      F - Fatal
      E - Error
      W - Warning
      I - Info and Debug Level 0
      D - All debug levels > 0
      Component name is logged in upper-case padded with trailing spaces to fit within 8 characters.
      Default log component is displayed with a hyphen.

      --------------

      It would be immensely useful if the mongo log would contain for each message the given log level. Currently it's almost impossible to do some automatic log querying (for example with logwatch) since you have to manually filter based on regular expressions what could possible be interesting to see. If a log level was saved with the log message, it would be possible to simply grep for 'warning' or 'error'

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              benety.goh Benety Goh
              Reporter:
              dominik Dominik Gehl
              Participants:
              Votes:
              12 Vote for this issue
              Watchers:
              19 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: