-
-
Save solars/df2708e5147b0f47e74e4c25de8868c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rails.logger | |
# => Log4r::Logger | |
module CustomWrapper | |
def error(input) | |
puts 'wrapped' | |
end | |
end | |
class Log4r::Logger | |
prepend CustomWrapper | |
end | |
Rails.logger.error | |
# => same as before |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment