|
@ -13,7 +13,7 @@ Rails.application.configure do |
|
|
config.eager_load = true |
|
|
config.eager_load = true |
|
|
|
|
|
|
|
|
# Full error reports are disabled and caching is turned on. |
|
|
# Full error reports are disabled and caching is turned on. |
|
|
config.consider_all_requests_local = false |
|
|
|
|
|
|
|
|
config.consider_all_requests_local = false |
|
|
config.action_controller.perform_caching = true |
|
|
config.action_controller.perform_caching = true |
|
|
|
|
|
|
|
|
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] |
|
|
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] |
|
@ -53,7 +53,7 @@ Rails.application.configure do |
|
|
config.log_level = :info |
|
|
config.log_level = :info |
|
|
|
|
|
|
|
|
# Prepend all log lines with the following tags. |
|
|
# Prepend all log lines with the following tags. |
|
|
config.log_tags = [ :request_id ] |
|
|
|
|
|
|
|
|
config.log_tags = [:request_id] |
|
|
|
|
|
|
|
|
# Use a different cache store in production. |
|
|
# Use a different cache store in production. |
|
|
# config.cache_store = :mem_cache_store |
|
|
# config.cache_store = :mem_cache_store |
|
@ -83,11 +83,15 @@ Rails.application.configure do |
|
|
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name") |
|
|
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name") |
|
|
|
|
|
|
|
|
if ENV["RAILS_LOG_TO_STDOUT"].present? |
|
|
if ENV["RAILS_LOG_TO_STDOUT"].present? |
|
|
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) |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
# Do not dump schema after migrations. |
|
|
# Do not dump schema after migrations. |
|
|
config.active_record.dump_schema_after_migration = false |
|
|
config.active_record.dump_schema_after_migration = false |
|
|
|
|
|
|
|
|
|
|
|
# Semantic Logger in console log only! |
|
|
|
|
|
require_relative "../../lib/formatters/basic_formatter" |
|
|
|
|
|
config.semantic_logger.add_appender(file_name: "log/production.log", formatter: BasicFormatter.new) |
|
|
end |
|
|
end |