Module: BrB
- Defined in:
- lib/brb/service.rb,
lib/brb/logger.rb,
lib/brb/tunnel.rb,
lib/brb/request.rb,
lib/brb/event_machine.rb,
lib/brb/tunnel/shared.rb
Overview
Brb Main class used to do basic distributed ruby, Simple but fast Use two distinct canal, one for the command reception, and the other one for send return value
Defined Under Namespace
Modules: Request, Tunnel Classes: EventMachine, Protocol, Service
Class Method Summary collapse
-
.default_logger ⇒ Object
returns the default logger instance.
-
.logger ⇒ Object
returns the logger instance.
-
.logger=(custom_logger) ⇒ Object
set a custom logger instance.
Instance Method Summary collapse
-
#logger ⇒ Object
alias to BrB.logger.
Class Method Details
.default_logger ⇒ Object
returns the default logger instance
7 8 9 |
# File 'lib/brb/logger.rb', line 7 def default_logger Logger.new(STDOUT) end |
.logger ⇒ Object
returns the logger instance
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/brb/logger.rb', line 17 def logger # use default logger if no custom logger is set @@logger = default_logger unless defined? @@logger # this overwrites the original method with a static definition eval %Q{ def logger @@logger end } @@logger end |
.logger=(custom_logger) ⇒ Object
set a custom logger instance
12 13 14 |
# File 'lib/brb/logger.rb', line 12 def logger=(custom_logger) @@logger = custom_logger end |