Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • %level - prints severity level of the log record. List of possible levels:

Level

Definition

TRACE

Most  Most detailed information.  Should be used very sparingly. 

DEBUG

Detailed information on the flow through the system.  This log level should never be used in customer-facing environments, but many applications will log debug-level information for troubleshooting purposes

INFO

Interesting runtime events (startup/shutdown). Expect these to be immediately visible on a console, so be conservative and keep to a minimum.  This log level contains informational details and is typically not going to be acted upon by Operations

WARN

Use of deprecated APIs, poor usage of API, 'almost' errors, other runtime situations that are undesirable or unexpected, but not necessarily "wrong".  This log level contains details that can be important but is typically not going to be acted upon by Operations. Some WARN level log items may be escalated if thresholds are met

ERROR

Other runtime errors or unexpected conditions.  This log level contains important error details that must be escalated immediately to remediate failure. This should be as actionable and detailed as possible. Business-level information (e.g. “Customer login was incorrect”) should not be logged at this level, but rather at the WARN level with “BUSINESS ALERT” in the message because they are not application failures.

FATAL 

Severe errors that causes cause premature termination.  Extreme An extreme version of “ERROR”

  • %tablevel - printsextra spaces for vertical alignment of records after %level
  • %date{FIX} - printsdate in 'YYYYMMDD-HH:MM:SS.sss' format
  • %date{ISO8601} - printsdate in 'YYYY-MM-DD HH:MM:SS,sss' format
  • %date  - printsdate in 'DD MMM YYYY HH:MM:SS,sss' format
  • %timezone - printstime zone abbreviation or name (setup TZ env variable to take abbreviation in windows) or 'UTC'
  • %logger - printslog category, component
  • %thread - printsthread id
  • %thread_name - prints a name of the thread
  • %message - prints a message

For more information please read the article: How to divide different categories and severities of log files into different files in the Logging section

...