Class: Kubes::Logger
- Inherits:
-
Logger
- Object
- Logger
- Kubes::Logger
- Defined in:
- lib/kubes/logger.rb
Instance Method Summary collapse
-
#add(severity, message = nil, progname = nil) ⇒ Object
Only need to override the add method as the other calls all lead to it.
-
#format_message(severity, timestamp, progname, msg) ⇒ Object
plain formatting.
Instance Method Details
#add(severity, message = nil, progname = nil) ⇒ Object
Only need to override the add method as the other calls all lead to it.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/kubes/logger.rb', line 6 def add(severity, = nil, progname = nil) # Taken from Logger#add source # https://ruby-doc.org/stdlib-2.5.1/libdoc/logger/rdoc/Logger.html#method-i-add if .nil? if block_given? = yield else = progname progname = @progname end end super # original logic end |
#format_message(severity, timestamp, progname, msg) ⇒ Object
plain formatting
22 23 24 |
# File 'lib/kubes/logger.rb', line 22 def (severity, , progname, msg) "#{msg}\n" end |