Skip to content

Commit caf645d

Browse files
authored
Merge pull request reidmorrison#136 from ojab/silence_redefinition_warnings
Silence method redifinition warnings
2 parents 3d9276c + acf9969 commit caf645d

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

lib/rails_semantic_logger/extensions/action_controller/live.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
ActionController::Live
33
module ActionController
44
module Live
5+
undef_method :log_error
56
def log_error(exception)
67
logger.fatal(exception)
78
end

lib/rails_semantic_logger/extensions/action_dispatch/debug_exceptions.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module ActionDispatch
44
class DebugExceptions
55
private
66

7+
undef_method :log_error
78
def log_error(_request, wrapper)
89
ActiveSupport::Deprecation.silence do
910
ActionController::Base.logger.fatal(wrapper.exception)

lib/rails_semantic_logger/extensions/action_view/streaming_template_renderer.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ class StreamingTemplateRenderer
66
class Body
77
private
88

9+
undef_method :log_error
910
def log_error(exception)
1011
ActionView::Base.logger.fatal(exception)
1112
end

lib/rails_semantic_logger/extensions/active_support/logger.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
module ActiveSupport
44
# More hacks to try and stop Rails from being it's own worst enemy.
55
class Logger
6+
class << self
7+
undef :logger_outputs_to?, :broadcast
8+
end
9+
610
# Prevent Console from trying to merge loggers
711
def self.logger_outputs_to?(*args)
812
true

0 commit comments

Comments
 (0)