Skip to content

Commit 16340f0

Browse files
authored
Merge pull request reidmorrison#155 from jcmfernandes/patch-1
Avoid warning when attempting to add a second console appender
2 parents e83a306 + 2481f01 commit 16340f0

File tree

1 file changed

+1
-1
lines changed
  • lib/rails_semantic_logger/extensions/rails

1 file changed

+1
-1
lines changed

lib/rails_semantic_logger/extensions/rails/server.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Server
99
def log_to_stdout
1010
wrapped_app # touch the app so the logger is set up
1111

12-
SemanticLogger.add_appender(io: $stdout, formatter: :color)
12+
SemanticLogger.add_appender(io: $stdout, formatter: :color) unless SemanticLogger.appenders.console_output?
1313
end
1414
end
1515
end

0 commit comments

Comments
 (0)