Class: Derelict::Utils::Logger::ArrayOutputter
- Inherits:
-
Log4r::Outputter
- Object
- Log4r::Outputter
- Derelict::Utils::Logger::ArrayOutputter
- Extended by:
- Memoist
- Defined in:
- lib/derelict/utils/logger/array_outputter.rb
Overview
A Log4r Outputter which stores all logs in an array
Logs are stored in the internal array by #write. Logs can be cleared using #flush, which returns the flushed logs too.
Instance Method Summary collapse
-
#flush ⇒ Object
Clear internal log messages array and return the erased data.
-
#level ⇒ Object
Force the outputter to receive and store all levels of messages.
-
#messages ⇒ Object
The internal array of messages.
Instance Method Details
#flush ⇒ Object
Clear internal log messages array and return the erased data
24 25 26 |
# File 'lib/derelict/utils/logger/array_outputter.rb', line 24 def flush .dup.tap { .clear } end |
#level ⇒ Object
Force the outputter to receive and store all levels of messages
13 14 15 |
# File 'lib/derelict/utils/logger/array_outputter.rb', line 13 def level Log4r::ALL end |
#messages ⇒ Object
The internal array of messages
18 19 20 |
# File 'lib/derelict/utils/logger/array_outputter.rb', line 18 def [] end |