|
|
@ -1,4 +1,4 @@ |
|
|
|
return unless Rails.application.server? |
|
|
|
return if Rails.application.tailwind_watcher? |
|
|
|
|
|
|
|
Rails.application.config.x.action_controller.main_session_tag = 'toto1' |
|
|
|
Rails.application.config.x.action_controller.main_session_tag_fixed_length = 8 |
|
|
@ -24,18 +24,24 @@ Rails.configuration.after_initialize do |
|
|
|
SemanticLogger.add_appender(appender:, formatter:) |
|
|
|
Semantic::Instrumentalizer.activate(*build_instrumentation_config) |
|
|
|
|
|
|
|
if Rails.application.rake? || Rails.application.console? |
|
|
|
io_formatter = Rails.application.config.x.semantic.formatter.constantize.new(time_format: '%H:%M:%S') |
|
|
|
SemanticLogger.add_appender(io: $stdout, formatter: io_formatter) |
|
|
|
end |
|
|
|
|
|
|
|
else |
|
|
|
time_format = '%H:%M:%S' unless Rails.application.procfile_server? |
|
|
|
SemanticLogger.clear_appenders! |
|
|
|
SemanticLogger.add_appender( |
|
|
|
io: $stdout, |
|
|
|
formatter: Rails.application.config.x.semantic.formatter.constantize.new |
|
|
|
formatter: Rails.application.config.x.semantic.formatter.constantize.new(time_format:) |
|
|
|
) |
|
|
|
|
|
|
|
Rails.autoloaders.main.on_load('ApplicationController') do |
|
|
|
SemanticLogger.clear_appenders! |
|
|
|
SemanticLogger.add_appender( |
|
|
|
io: $stdout, |
|
|
|
formatter: Rails.application.config.x.semantic.formatter.constantize.new |
|
|
|
formatter: Rails.application.config.x.semantic.formatter.constantize.new(time_format:) |
|
|
|
) |
|
|
|
|
|
|
|
Rails.logger.info ' ', dimensions: Semantic::FancyDimensions.new(rails: '╔═╗', before: 1) |
|
|
|