Class: UncleKryon::UncleKryonLogger
- Inherits:
-
Logger
- Object
- Logger
- UncleKryon::UncleKryonLogger
- Defined in:
- lib/unclekryon/log.rb
Direct Known Subclasses
Instance Method Summary collapse
- #build_message(message, error: nil, **options) ⇒ Object
- #error(message, error: nil, **options) ⇒ Object
- #fatal(message, error: nil, **options) ⇒ Object
-
#initialize ⇒ UncleKryonLogger
constructor
A new instance of UncleKryonLogger.
- #unknown(message, error: nil, **options) ⇒ Object
- #warn(message, error: nil, **options) ⇒ Object
Constructor Details
#initialize ⇒ UncleKryonLogger
Returns a new instance of UncleKryonLogger.
17 18 19 20 21 |
# File 'lib/unclekryon/log.rb', line 17 def initialize super($stdout) @progname = self.class.to_s end |
Instance Method Details
#build_message(message, error: nil, **options) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/unclekryon/log.rb', line 23 def (,error: nil,**) # Don't use mutable methods += error.backtrace.map{|e| "\n > " + e}.join('') if !error.nil? return end |
#error(message, error: nil, **options) ⇒ Object
30 31 32 |
# File 'lib/unclekryon/log.rb', line 30 def error(,error: nil,**) super((,error: error,**)) end |
#fatal(message, error: nil, **options) ⇒ Object
34 35 36 |
# File 'lib/unclekryon/log.rb', line 34 def fatal(,error: nil,**) super((,error: error,**)) end |
#unknown(message, error: nil, **options) ⇒ Object
38 39 40 |
# File 'lib/unclekryon/log.rb', line 38 def unknown(,error: nil,**) super((,error: error,**)) end |
#warn(message, error: nil, **options) ⇒ Object
42 43 44 |
# File 'lib/unclekryon/log.rb', line 42 def warn(,error: nil,**) super((,error: error,**)) end |