forked from rudionrails/yell
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to Module#prepend to patch stdlib Logger
instead of older style alias_method chain juggling. We hope this has fewer poor interactions with other things patching Logger as in rudionrails#60. And it's just a more modern cleaner style. Could be a first step to making this stdlib Logger patching optional, but does not require that.
- Loading branch information
Showing
3 changed files
with
17 additions
and
18 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module Yell | ||
# Module intended to be prepended onto ::Logger | ||
module StdlibLogWrapper | ||
def level=(level) | ||
super(level.is_a?(Yell::Level) ? Integer(level) : level) | ||
end | ||
|
||
def add( severity, message = nil, progname = nil, &block ) | ||
super(Integer(severity), message, progname, &block) | ||
end | ||
end | ||
end |