Class: RemoteLogger::DrbLogger
- Defined in:
- lib/remote_logger/drb_logger.rb
Overview
Subclass of RemoteLogger::Logger communicating via DRb protocol
Class Method Summary collapse
Methods inherited from Logger
Constructor Details
This class inherits a constructor from RemoteLogger::Logger
Class Method Details
.find(options = {}) ⇒ Object
26 27 28 29 30 31 |
# File 'lib/remote_logger/drb_logger.rb', line 26 def self.find( = {}) DRb.start_service # Connecting to Logger DRbObject.new_with_uri([:uri]||DRB_URI) end |
.start(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/remote_logger/drb_logger.rb', line 6 def self.start( = {}) # Adding some security (disable remote eval) $SAFE = 1 name = [:name] || LOGGER_NAME # Creating logger instance logger = new # Raising new RingyDingy service logger.info "#{name}: Initializing service..." if [:verbose] DRb.start_service([:uri]||DRB_URI, logger) logger.info "#{name}: Service started" if [:verbose] DRb.thread.join # Never reaches this point... logger.info "#{name}: Service finished" if [:verbose] end |