Configuration: Logger
Pakyow provides the following environment config options for the logger:
logger.level
: What level of logs to capture from. Default::debug
;:info
in productionlogger.formatter
: The formatter to use when writing logs. Default:Pakyow::Logger::DevFormatter
;Pakyow::Logger::LogfmtFormatter
in productionlogger.destinations
: Array ofIO
objects or paths that log output should be written to. Default:[$stdout]
;["/dev/null"]
if the logger is disabledlogger.enabled
: Whether or not logging should occur at all. It's safe to set this tofalse
without removing log statements from your code. Default:true
in development;false
in test
Example Usage
Logger config lives in config/environment.rb
:
Pakyow.configure do
config.logger.option = value
end