Class: Kuby::BasicLogger
- Inherits:
-
Logger
- Object
- Logger
- Kuby::BasicLogger
- Defined in:
- lib/kuby/basic_logger.rb
Instance Method Summary collapse
- #fatal(msg, *args) ⇒ Object
- #info(msg, *args) ⇒ Object
-
#initialize(*args) ⇒ BasicLogger
constructor
A new instance of BasicLogger.
Constructor Details
#initialize(*args) ⇒ BasicLogger
Returns a new instance of BasicLogger.
6 7 8 9 10 11 12 |
# File 'lib/kuby/basic_logger.rb', line 6 def initialize(*args) super self.formatter = proc do |_severity, _datetime, _progname, msg| "#{msg}\n" end end |
Instance Method Details
#fatal(msg, *args) ⇒ Object
18 19 20 |
# File 'lib/kuby/basic_logger.rb', line 18 def fatal(msg, *args) super(ColorizedString[msg].red, *args) end |
#info(msg, *args) ⇒ Object
14 15 16 |
# File 'lib/kuby/basic_logger.rb', line 14 def info(msg, *args) super(ColorizedString[msg].yellow, *args) end |