Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
43 additions
and
16 deletions.
There are no files selected for viewing
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,31 @@ | ||
require 'celluloid/logger' | ||
|
||
module Listen | ||
module Internals | ||
module Logging | ||
def _info(*args) | ||
_log(:info, *args) | ||
end | ||
|
||
def _warn(*args) | ||
_log(:warn, *args) | ||
end | ||
|
||
def _debug(*args) | ||
_log(:debug, *args) | ||
end | ||
|
||
def _log(*args) | ||
Celluloid::Logger.send(*args) | ||
end | ||
|
||
def _format_error(fmt) | ||
format(fmt, $ERROR_INFO, ", Backtrace: \n" + $ERROR_POSITION * "\n") | ||
end | ||
|
||
def _error_exception(fmt) | ||
_log :error, _format_error(fmt) | ||
end | ||
end | ||
end | ||
end |
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