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