class Lumberjack::Device::LogFile

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

def file_stream

def file_stream
  File.new(@path, "a", encoding: EXTERNAL_ENCODING)
end

def initialize(path, options = {})

Parameters:
  • options (Hash) -- The options for the device.
  • path (String, Pathname) -- The path to the log file.
def initialize(path, options = {})
  @path = File.expand_path(path)
  FileUtils.mkdir_p(File.dirname(@path))
  super(file_stream, options)
end

def reopen(logdev = nil)

Returns:
  • (void) -

Parameters:
  • logdev (Object) -- not used
def reopen(logdev = nil)
  close
  @stream = file_stream
end