Module: IpcAuthpipe::Log

Extended by:
Forwardable
Defined in:
lib/ipcauthpipe/log.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.loggerObject (readonly)

Returns the value of attribute logger.



9
10
11
# File 'lib/ipcauthpipe/log.rb', line 9

def logger
  @logger
end

Class Method Details

.init(filename, loglevel) ⇒ Object



11
12
13
14
15
16
# File 'lib/ipcauthpipe/log.rb', line 11

def init(filename, loglevel)
  @logger = Logger.new(filename)
  @logger.level = Logger.const_get(loglevel.upcase)
  @logger.formatter = Logger::Formatter.new
  @logger.info "Logger is started"
end