new(logdev, shift_age = 0, shift_size = 1048576, level: DEBUG, progname: nil, formatter: nil, datetime_format: nil, shift_period_suffix: '%Y%m%d') public

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). Default value is 0.

shift_size

Maximum logfile size in bytes (only applies when shift_age is a number). Defaults to 1048576 (1MB).

level

Logging severity threshold. Default values is Logger::DEBUG.

progname

Program name to include in log messages. Default value is nil.

formatter

Logging formatter. Default values is an instance of Logger::Formatter.

datetime_format

Date and time format. Default value is ā€˜%Y-%m-%d %H:%M:%Sā€™.

shift_period_suffix

The log file suffix format for daily, weekly or monthly rotation. Default is ā€˜%Y%m%dā€™.

Description

Create an instance.

Show source
Register or log in to add new notes.