Added logging level manipulation mechanism
This commit is contained in:
@@ -38,3 +38,9 @@ _Default_: `/app/db/database/snibox.sqlite3`
|
||||
---
|
||||
|
||||
`SECRET_KEY_BASE` - Defines `secret_key_base` parameter for your Rails application. Default one is included into the image already, but general recommendation is to change it.
|
||||
|
||||
---
|
||||
|
||||
`LOGLEVEL` - Defines logging level for Rails application. Available options are: `debug`, `info`, `warn`, `error` and `fatal`
|
||||
|
||||
_Default_: `debug`
|
||||
|
||||
@@ -29,7 +29,7 @@ module Snibox
|
||||
logger = ActiveSupport::Logger.new(STDOUT)
|
||||
logger.formatter = config.log_formatter
|
||||
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
||||
config.log_level = :debug
|
||||
config.log_level = (ENV['LOGLEVEL'] || "debug").to_sym
|
||||
config.log_tags = [ :request_id ]
|
||||
|
||||
# Settings in config/environments/* take precedence over those specified here.
|
||||
|
||||
Reference in New Issue
Block a user