Module: Nsqcd::Concerns::Logging::ClassMethods

Defined in:
lib/nsqcd/concerns/logging.rb

Instance Method Summary collapse

Instance Method Details

#configure_logger(log = nil) ⇒ Object



20
21
22
23
24
25
26
27
28
# File 'lib/nsqcd/concerns/logging.rb', line 20

def configure_logger(log=nil)
  if log
    @logger = log
  else
    @logger = Logger.new(STDOUT)
    @logger.level = Logger::INFO
    @logger.formatter = Nsqcd::Support::ProductionFormatter
  end
end

#loggerObject



12
13
14
# File 'lib/nsqcd/concerns/logging.rb', line 12

def logger
  @logger
end

#logger=(logger) ⇒ Object



16
17
18
# File 'lib/nsqcd/concerns/logging.rb', line 16

def logger=(logger)
  @logger = logger
end