Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use Syslog for integration #188

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@

config.active_job.queue_adapter = :sidekiq
# config.active_job.queue_name_prefix = "exhibits_#{Rails.env}"
config.debug_logger = Logger.new("#{Rails.root}/log/debug.log")
# config.debug_logger = Logger.new("#{Rails.root}/log/debug.log") # write to with Rails.application.config.debug_logger.warn("Text to log.")
end
32 changes: 16 additions & 16 deletions config/environments/integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,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 = [:request_id]

# Use a different cache store in production.
# config.cache_store = :mem_cache_store

Expand All @@ -68,19 +61,26 @@
# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify

# 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 = [:request_id]

# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new

# Use a different logger for distributed setups.
# require 'syslog/logger'
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')

if ENV["RAILS_LOG_TO_STDOUT"].present?
logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
end
config.debug_logger = Logger.new("#{Rails.root}/log/debug.log")
require 'syslog/logger'
config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'exhibits-int')

# if ENV["RAILS_LOG_TO_STDOUT"].present?
# logger = ActiveSupport::Logger.new(STDOUT)
# logger.formatter = config.log_formatter
# config.logger = ActiveSupport::TaggedLogging.new(logger)
# end
# config.debug_logger = Logger.new("#{Rails.root}/log/debug.log") # write to with Rails.application.config.debug_logger.warn("Text to log.")

# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
Expand Down