Class Logging::Appenders::File
In: lib/logging/appenders/file.rb
Parent: ::Logging::Appenders::IO

This class provides an Appender that can write to a File.

Methods

Public Class methods

Asserts that the given filename can be used as a log file by ensuring that if the file exists it is a regular file and it is writable. If the file does not exist, then the directory is checked to see if it is writable.

An ArgumentError is raised if any of these assertions fail.

Creates a new File Appender that will use the given filename as the logging destination. If the file does not already exist it will be created. If the :truncate option is set to true then the file will be truncated before writing begins; otherwise, log messages will be appended to the file.

Public Instance methods

Returns the path to the logfile.

Reopen the connection to the underlying logging destination. If the connection is currently closed then it will be opened. If the connection is currently open then it will be closed and immediately opened.

[Validate]