class Lumberjack::Device::LogFile

This is a logging device that appends log entries to a file.

Constants

EXTERNAL_ENCODING

Attributes

path[R]

The absolute path of the file being logged to.

Public Class Methods

new(path, options = {}) click to toggle source

Create a logger to the file at path. Options are passed through to the Writer constructor.

Calls superclass method
# File lib/lumberjack/device/log_file.rb, line 15
def initialize(path, options = {})
  @path = File.expand_path(path)
  FileUtils.mkdir_p(File.dirname(@path))
  super(File.new(@path, 'a', :encoding => EXTERNAL_ENCODING), options)
end