close

close() Instance Public methods

write

write(message) Instance Public methods

new

Logger.new(name, shift_age = 7, shift_size = 1048576)Logger.new(name, shift_age = 'weekly') Class Public methods Args logdev The log device. This is a filename (String) or IO object (typically STDOUT, STDERR, or an open file). shift_age Number of old log files to keep, or frequency of rotation (daily, weekly or monthly). shift_size Maximum logfile size (only applies when shift_age is a number). Description Create an instance.

<<

<<(msg) Instance Public methods Dump given message to the log device without any formatting. If no log device exists, return nil.

add

Logger#add(severity, message = nil, progname = nil) { ... } Instance Public methods Args severity Severity. Constants are defined in Logger namespace: DEBUG, INFO, WARN, ERROR, FATAL, or UNKNOWN. message The log message. A String or Exception. progname Program name string. Can be omitted. Treated as a message if no message and block are given. block Can be omitted. Called to get a message string if message is nil. Return true if successful, false otherwise. W

close

close() Instance Public methods Close the logging device.

datetime_format

datetime_format() Instance Public methods Returns the date format being used. See datetime_format=

datetime_format=

datetime_format=(datetime_format) Instance Public methods Set date-time format. datetime_format A string suitable for passing to strftime.

debug

debug(progname = nil, &block) Instance Public methods Log a DEBUG message. See info for more information.

debug?

debug?() Instance Public methods Returns true iff the current severity level allows for the printing of DEBUG messages.