Added parameter for log level (#2546)

* Added parameter for log level

* Added fix for Rubocop + RSpec check and `RAILS_LOG_LEVEL` is now optionally. Default value/log level is `info`.

* Set default log level from `info` to `debug` for RSpec check...

* Update application.rb

Moving it to config/environments/production.rb

* Update production.rb

* Update production.rb

Forgot to change the default logging level again from `:debug` to :info`

Co-authored-by: kaihen <>
This commit is contained in:
Kai 2021-05-04 18:39:51 +02:00 committed by GitHub
parent 4d4edca052
commit af638ca43d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -125,6 +125,9 @@ Rails.application.configure do
# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify
# Specify the log level
config.log_level = ENV["RAILS_LOG_LEVEL"].present? ? ENV['RAILS_LOG_LEVEL'].to_sym : :info
# Use Lograge for logging
config.lograge.enabled = true
@ -141,8 +144,6 @@ Rails.application.configure do
"#{time} - #{severity}: #{msg} \n"
end
config.log_level = :info
# Prepend all log lines with the following tags.
config.log_tags = [:request_id, :remote_ip]

View File

@ -259,6 +259,11 @@ ENABLE_SSL=true
# RAILS_LOG_REMOTE_PORT=9999
# RAILS_LOG_REMOTE_TAG=greenlight
# Specify the log level
# Allowed values are: debug|info|warn|error|fatal|unknown
# For details, see: https://docs.ruby-lang.org/en/master/Logger.html
#RAILS_LOG_LEVEL=info
# Database settings
#
# Greenlight may work out of the box with sqlite3, but for production it is recommended to use postgresql.