We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6684880 commit 7cf794fCopy full SHA for 7cf794f
lib/rails_semantic_logger/engine.rb
@@ -221,7 +221,8 @@ class Engine < ::Rails::Engine
221
console do |_app|
222
# Don't use a background thread for logging
223
SemanticLogger.sync!
224
- if config.rails_semantic_logger.console_logger
+ # Add a stderr logger when running inside a Rails console unless one has already been added.
225
+ if config.rails_semantic_logger.console_logger && !SemanticLogger::Logger.processor.appenders.console_output?
226
SemanticLogger.add_appender(io: STDERR, formatter: :color)
227
end
228
0 commit comments