Skip to content

Commit

Permalink
feat: add configurable log level
Browse files Browse the repository at this point in the history
  • Loading branch information
karolsojko committed May 28, 2021
1 parent 26732f5 commit 7375500
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ RAILS_ENV=development
PORT=3001
WEB_CONCURRENCY=0
RAILS_LOG_TO_STDOUT=true
# Log Level options: "INFO" | "DEBUG" | "INFO" | "WARN" | "ERROR" | "FATAL"
RAILS_LOG_LEVEL=INFO
RAILS_SERVE_STATIC_FILES=true
SECRET_KEY_BASE=test
APP_HOST=http://localhost:3001
Expand Down
6 changes: 2 additions & 4 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
config.logger = ActiveSupport::Logger.new(STDOUT)
end

config.log_level = ENV.fetch('RAILS_LOG_LEVEL', 'INFO').to_sym

config.colorize_logging = false
config.logger.formatter = StandardNotesFormatter.new

Expand Down Expand Up @@ -64,10 +66,6 @@
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true

# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
config.log_level = :info

# Prepend all log lines with the following tags.
# config.log_tags = [ :subdomain, :uuid ]

Expand Down

0 comments on commit 7375500

Please sign in to comment.