diff --git a/.env.sample b/.env.sample index cb3d1bc49..f37bb8833 100644 --- a/.env.sample +++ b/.env.sample @@ -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 diff --git a/config/environments/production.rb b/config/environments/production.rb index dd385facf..a03ef162b 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -11,6 +11,8 @@ Rails.application.configure do 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 @@ -64,10 +66,6 @@ Rails.application.configure do # 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 ]