|
@ -15,12 +15,13 @@ end |
|
|
|
|
|
|
|
|
Rails.configuration.after_initialize do |
|
|
Rails.configuration.after_initialize do |
|
|
RailsSemanticLogger::Rack::Logger.logger.level = :info # useful for remaining log like "[Rack::Log] Started..." |
|
|
RailsSemanticLogger::Rack::Logger.logger.level = :info # useful for remaining log like "[Rack::Log] Started..." |
|
|
|
|
|
SemanticLogger.default_level = :debug |
|
|
Rails.logger.name = 'rails' |
|
|
Rails.logger.name = 'rails' |
|
|
|
|
|
|
|
|
if Rails.env.production? |
|
|
if Rails.env.production? |
|
|
|
|
|
|
|
|
|
|
|
appender = :syslog |
|
|
formatter = Rails.application.config.x.semantic.formatter.constantize.new |
|
|
formatter = Rails.application.config.x.semantic.formatter.constantize.new |
|
|
SemanticLogger.add_appender(appender: :syslog, formatter:) |
|
|
|
|
|
|
|
|
SemanticLogger.add_appender(appender:, formatter:) |
|
|
Semantic::Instrumentalizer.activate(*build_instrumentation_config) |
|
|
Semantic::Instrumentalizer.activate(*build_instrumentation_config) |
|
|
|
|
|
|
|
|
else |
|
|
else |
|
|