|
@ -14,6 +14,8 @@ def build_instrumentation_config |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
Rails.configuration.after_initialize do |
|
|
Rails.configuration.after_initialize do |
|
|
|
|
|
SemanticLogger.clear_appenders! |
|
|
|
|
|
RailsSemanticLogger::Rack::Logger.logger.level = :info # useful for remaining log like "[Rack::Log] Started..." |
|
|
Rails.logger.name = 'rails' |
|
|
Rails.logger.name = 'rails' |
|
|
|
|
|
|
|
|
if Rails.env.production? |
|
|
if Rails.env.production? |
|
@ -25,11 +27,9 @@ Rails.configuration.after_initialize do |
|
|
|
|
|
|
|
|
Rails.logger.info('adding instrumentations...') |
|
|
Rails.logger.info('adding instrumentations...') |
|
|
Semantic::Instrumentalizer.activate(*build_instrumentation_config) |
|
|
Semantic::Instrumentalizer.activate(*build_instrumentation_config) |
|
|
Rails.logger.info('adding instrumentations...DONE') |
|
|
|
|
|
|
|
|
Rails.logger.info('adding instrumentations...DONE', build_instrumentation_config) |
|
|
|
|
|
|
|
|
else |
|
|
else |
|
|
SemanticLogger.clear_appenders! |
|
|
|
|
|
RailsSemanticLogger::Rack::Logger.logger.level = :info # useful for remaining log like "[Rack::Log] Started..." |
|
|
|
|
|
|
|
|
|
|
|
SemanticLogger.add_appender( |
|
|
SemanticLogger.add_appender( |
|
|
io: $stdout, |
|
|
io: $stdout, |
|
|