Module: Jsus::Util::Logger::Buffering
- Included in:
- Jsus::Util::Logger
- Defined in:
- lib/jsus/util/logger.rb
Instance Method Summary collapse
-
#add(severity, message = nil, progname = nil, &block) ⇒ Object
buffer=.
-
#buffer ⇒ Object
Buffer storing logged messages.
-
#buffer=(value) ⇒ Object
buffer.
Instance Method Details
#add(severity, message = nil, progname = nil, &block) ⇒ Object
buffer=
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/jsus/util/logger.rb', line 16 def add(severity, = nil, progname = nil, &block) unless @logdev.nil? or severity < @level if .nil? if block_given? = yield else = progname progname = @progname end end buffer << [severity, ] end super end |
#buffer ⇒ Object
Buffer storing logged messages
8 9 10 |
# File 'lib/jsus/util/logger.rb', line 8 def buffer @buffer ||= [] end |
#buffer=(value) ⇒ Object
buffer
12 13 14 |
# File 'lib/jsus/util/logger.rb', line 12 def buffer=(value) @buffer = value end |