Commit b1f937a2 authored by Aanand Prasad's avatar Aanand Prasad
Browse files

Rails logs to stdout

parent 4c58c0bc
Pipeline #4070 passed with stages
in 5 minutes and 22 seconds
......@@ -26,5 +26,6 @@ INK_EMAIL=admin@admin.com
INK_PASSWORD=abc12345
INK_AUTH=abc12345
RAILS_ENV=development
RAILS_LOG_TO_STDOUT=1
DISABLE_DATABASE_ENVIRONMENT_CHECK=1
......@@ -79,6 +79,7 @@ Rails.application.configure do
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
if ENV["RAILS_LOG_TO_STDOUT"].present?
STDOUT.sync = true
logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
......
......@@ -42,6 +42,13 @@ Rails.application.configure do
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
if ENV["RAILS_LOG_TO_STDOUT"].present?
STDOUT.sync = true
logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
end
# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load
......
......@@ -79,6 +79,7 @@ Rails.application.configure do
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
if ENV["RAILS_LOG_TO_STDOUT"].present?
STDOUT.sync = true
logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
......
......@@ -79,6 +79,7 @@ Rails.application.configure do
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
if ENV["RAILS_LOG_TO_STDOUT"].present?
STDOUT.sync = true
logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment