Class: Logging::Logger
- Inherits:
-
Object
- Object
- Logging::Logger
- Defined in:
- lib/unibanner/logger.rb
Instance Method Summary collapse
-
#incoming(data = nil) ⇒ Object
log an incoming line.
- #incoming? ⇒ Boolean
-
#outgoing(data = nil) ⇒ Object
log an outgoing line.
- #outgoing? ⇒ Boolean
Instance Method Details
#incoming(data = nil) ⇒ Object
log an incoming line
11 12 13 14 15 |
# File 'lib/unibanner/logger.rb', line 11 def incoming( data = nil ) data = yield if block_given? log_event(::Logging::LogEvent.new(@name, 1, " #{Paint['->', 'green']} #{data}", @caller_tracing)) true end |
#incoming? ⇒ Boolean
7 |
# File 'lib/unibanner/logger.rb', line 7 def incoming?( ); true; end |
#outgoing(data = nil) ⇒ Object
log an outgoing line
19 20 21 22 23 |
# File 'lib/unibanner/logger.rb', line 19 def outgoing( data = nil ) data = yield if block_given? log_event(::Logging::LogEvent.new(@name, 1, " #{Paint['<-', 'red']} #{data}", @caller_tracing)) true end |
#outgoing? ⇒ Boolean
16 |
# File 'lib/unibanner/logger.rb', line 16 def outgoing?( ); true; end |