Class: Log4r::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/win32/autogui/logging.rb

Instance Method Summary collapse

Instance Method Details

#logfileString

Returns filename of the logfile.

Returns:

  • (String)

    filename of the logfile



16
17
18
# File 'lib/win32/autogui/logging.rb', line 16

def logfile
  @filename
end

#logfile=(fn) ⇒ Object



20
21
22
23
24
# File 'lib/win32/autogui/logging.rb', line 20

def logfile=(fn)
  FileOutputter.new(:logfile, :filename => fn, :trunc => true)
  Outputter[:logfile].formatter = Log4r::PatternFormatter.new(:pattern => "[%5l %d] %M [%t]")
  add(:logfile)
end