Class: Filum::Logger

Inherits:
Logger
  • Object
show all
Defined in:
lib/filum/logger.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(logfile, options = {}) ⇒ Logger

Returns a new instance of Logger.



7
8
9
10
11
12
13
14
# File 'lib/filum/logger.rb', line 7

def initialize(logfile, options = {})
  @logfile = logfile
  create_log_directory

  super(logfile, shift_age='daily')
  self.formatter = Filum::LogFormatter.new(options)
  self.level = Logger::INFO
end

Instance Attribute Details

#logfileObject (readonly)

Returns the value of attribute logfile.



6
7
8
# File 'lib/filum/logger.rb', line 6

def logfile
  @logfile
end

Instance Method Details

#context_id=(context_id) ⇒ Object



16
17
18
# File 'lib/filum/logger.rb', line 16

def context_id=(context_id)
  Thread.current[:context_id] = context_id
end