Refactoring: config.log_formatter is for all environments the same but configured in each.
This commit is contained in:
parent
19ec7fe5f1
commit
f1dfbafdcd
4 changed files with 3 additions and 12 deletions
|
@ -50,6 +50,9 @@ module Zammad
|
||||||
|
|
||||||
config.active_job.queue_adapter = :delayed_job
|
config.active_job.queue_adapter = :delayed_job
|
||||||
|
|
||||||
|
# Use custom logger to log Thread id next to Process pid
|
||||||
|
config.log_formatter = ::Logger::Formatter.new
|
||||||
|
|
||||||
# REST api path
|
# REST api path
|
||||||
config.api_path = '/api/v1'
|
config.api_path = '/api/v1'
|
||||||
|
|
||||||
|
|
|
@ -48,9 +48,6 @@ Rails.application.configure do
|
||||||
# yet still be able to expire them through the digest params.
|
# yet still be able to expire them through the digest params.
|
||||||
config.assets.digest = false
|
config.assets.digest = false
|
||||||
|
|
||||||
# format log
|
|
||||||
config.log_formatter = Logger::Formatter.new
|
|
||||||
|
|
||||||
# Adds additional error checking when serving assets at runtime.
|
# Adds additional error checking when serving assets at runtime.
|
||||||
# Checks for improperly declared sprockets dependencies.
|
# Checks for improperly declared sprockets dependencies.
|
||||||
# Raises helpful error messages.
|
# Raises helpful error messages.
|
||||||
|
|
|
@ -71,15 +71,9 @@ Rails.application.configure do
|
||||||
# Send deprecation notices to registered listeners.
|
# Send deprecation notices to registered listeners.
|
||||||
config.active_support.deprecation = :notify
|
config.active_support.deprecation = :notify
|
||||||
|
|
||||||
# Use default logging formatter so that PID and timestamp are not suppressed.
|
|
||||||
config.log_formatter = ::Logger::Formatter.new
|
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
# format log
|
|
||||||
config.log_formatter = Logger::Formatter.new
|
|
||||||
|
|
||||||
# overwrite default Rails TRUSTED_PROXIES
|
# overwrite default Rails TRUSTED_PROXIES
|
||||||
# because otherwise IPs from private ranges will be
|
# because otherwise IPs from private ranges will be
|
||||||
# ignored for Session logging and fall back to localhost
|
# ignored for Session logging and fall back to localhost
|
||||||
|
|
|
@ -43,9 +43,6 @@ Rails.application.configure do
|
||||||
# Enable autoload
|
# Enable autoload
|
||||||
config.dependency_loading = true
|
config.dependency_loading = true
|
||||||
|
|
||||||
# format log
|
|
||||||
config.log_formatter = Logger::Formatter.new
|
|
||||||
|
|
||||||
config.after_initialize do
|
config.after_initialize do
|
||||||
ActiveRecord::Base.logger = Rails.logger.clone
|
ActiveRecord::Base.logger = Rails.logger.clone
|
||||||
ActiveRecord::Base.logger.level = Logger::INFO
|
ActiveRecord::Base.logger.level = Logger::INFO
|
||||||
|
|
Loading…
Reference in a new issue