Added logging level manipulation mechanism
This commit is contained in:
@@ -37,4 +37,10 @@ _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.
|
`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 = ActiveSupport::Logger.new(STDOUT)
|
||||||
logger.formatter = config.log_formatter
|
logger.formatter = config.log_formatter
|
||||||
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
||||||
config.log_level = :debug
|
config.log_level = (ENV['LOGLEVEL'] || "debug").to_sym
|
||||||
config.log_tags = [ :request_id ]
|
config.log_tags = [ :request_id ]
|
||||||
|
|
||||||
# Settings in config/environments/* take precedence over those specified here.
|
# Settings in config/environments/* take precedence over those specified here.
|
||||||
|
|||||||
Reference in New Issue
Block a user