Class: ReeLogger::StdoutAppender
- Includes:
- Ree::LinkDSL
- Defined in:
- lib/ree_lib/packages/ree_logger/package/ree_logger/appenders/stdout_appender.rb
Instance Attribute Summary
Attributes inherited from Appender
Instance Method Summary collapse
- #append(event, progname = nil) ⇒ Object
-
#initialize(level, formatter = nil) ⇒ StdoutAppender
constructor
A new instance of StdoutAppender.
Constructor Details
#initialize(level, formatter = nil) ⇒ StdoutAppender
Returns a new instance of StdoutAppender.
15 16 17 18 19 20 |
# File 'lib/ree_lib/packages/ree_logger/package/ree_logger/appenders/stdout_appender.rb', line 15 def initialize(level, formatter = nil) super( level, formatter || ColorizedFormatter.new ) end |
Instance Method Details
#append(event, progname = nil) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/ree_lib/packages/ree_logger/package/ree_logger/appenders/stdout_appender.rb', line 24 def append(event, progname = nil) = @formatter.format(event, progname) print( + "\n") STDOUT.flush nil end |