|
# Configuration values can be set per environment and apply to the root logger that
|
|
# all other loggers inherit from. Additional loggers can be configured in settings.yaml
|
|
# The valid options are:
|
|
#
|
|
# :colorize:
|
|
# Colorize log including level token based on severity
|
|
# values: true, false
|
|
#
|
|
# :console_inline:
|
|
# Enable logging output inline in rails console
|
|
# values: true, false
|
|
#
|
|
# :level:
|
|
# Only messages with severity >= this level from all loggers will be logged
|
|
# values: debug, info, warn, error, fatal, unknown
|
|
#
|
|
# :type:
|
|
# Type of logging, for file variant you can specify other options below like filename
|
|
# values: file, stdout, syslog or journald
|
|
#
|
|
# :filename:
|
|
# Log filename for this environment, it will be placed into #{Rails.root}/log directory
|
|
# note when you log outside of standard rails path you won't see log output in WEBrick
|
|
# STDOUT (usually not wanted in development), to use Rails default path, don't set path
|
|
#
|
|
# :truncate:
|
|
# Truncate the log file to a zero byte length on each startup to reduce size, only
|
|
# supported with type: file
|
|
# values: true, false (default)
|
|
#
|
|
# :log_trace:
|
|
# Include caller tracing information in generated log events (this
|
|
# includes filename and line number of the log message)
|
|
# values: true, false
|
|
#
|
|
# :layout:
|
|
# Formatter, one of 'pattern', 'multiline_pattern', 'multiline_request_pattern' or 'json'. The multiline pattern prepends
|
|
# '|' characters on all additional lines for better readability. The multiline request pattern also adds request id to
|
|
# all additional line for better log searching.
|
|
#
|
|
# :json_items:
|
|
# Items to include in JSON. Only applies when 'json' layout is set. Possible items are
|
|
# logger timestamp level message file line method hostname pid millis thread_id thread
|
|
# mdc ndc. Global fields like session or organization are available under 'mdc' item,
|
|
# local fields like exception class or backtrace are under 'ndc' item.
|
|
#
|
|
# :pattern:
|
|
# Logger line pattern, currently ignored by syslog. You can use the following macros
|
|
# [%c] name of the logger that generate the log event
|
|
# [%d] datestamp
|
|
# [%m] the user supplied log message
|
|
# [%p] PID of the current process
|
|
# [%r] the time in milliseconds since the program started
|
|
# [%T] the name of the thread Thread.current[:name]
|
|
# [%t] object_id of the thread
|
|
# [%F] filename where the logging request was issued
|
|
# [%L] line number where the logging request was issued
|
|
# [%M] method name where the logging request was issued
|
|
# [%X{request}] request-ID set in HTTP headers, or random UUID
|
|
# [%X{session}] random ID assigned per session (not available for the initial log line by Rails)
|
|
# [%X{user_login}] currently logged user if present
|
|
# [%X{org_id}] current organization id if available
|
|
# [%X{loc_id}] current location id if available
|
|
# [%X{remote_ip}] remote IP
|
|
# [%x{exception_class}] exception info (only for exception entries)
|
|
# [%x{exception_message}] exception info (only for exception entries)
|
|
# [%x{exception_backtrace}] exception info (only for exception entries)
|
|
# [%X{string}] generic field set via MDC (::Logging.mdc['string'])
|
|
# [%x{string}] generic field set via NDC (::Logging.ndc['string'])
|
|
#
|
|
# :sys_pattern:
|
|
# Logger line pattern for system log/journal. See :pattern for more info.
|
|
#
|
|
# :facility:
|
|
# System log/journal facility to use. One of LOG_AUTH, LOG_AUTHPRIV, LOG_CONSOLE,
|
|
# LOG_CRON, LOG_DAEMON, LOG_FTP, LOG_KERN, LOG_LPR, LOG_MAIL, LOG_NEWS, LOG_NTP,
|
|
# LOG_SECURITY, LOG_SYSLOG, LOG_USER, LOG_UUCP, LOG_LOCAL0 to LOG_LOCAL7. See
|
|
# syslog(3) man page for more info.
|
|
#
|
|
:default:
|
|
:colorize: false
|
|
:console_inline: false
|
|
:log_trace: false
|
|
:level: info
|
|
:type: file
|
|
:layout: multiline_request_pattern
|
|
:json_items:
|
|
- logger
|
|
- timestamp
|
|
- level
|
|
- message
|
|
- mdc
|
|
- ndc
|
|
:pattern: "%d [%.1l|%.3c|%.8X{request}] %m\n"
|
|
:sys_pattern: "%m\n"
|
|
:facility: LOG_LOCAL6
|
|
|
|
:production:
|
|
:filename: "production.log"
|
|
|
|
:development:
|
|
:colorize: true
|
|
:console_inline: true
|
|
:level: debug
|
|
:filename: "development.log"
|
|
|
|
:test:
|
|
:level: debug
|
|
:filename: "test.log"
|
|
:truncate: true
|