NAME

Zonemaster::Backend::Log

SYNOPSIS

Log::Any::Adapter->set(
    '+Zonemaster::Backend::Log',
    log_level      => 'info',
    json           => 0,
    file           => '/path/to/logfile.log',
    with_pid       => 1,
    with_timestamp => 1,
);

DESCRIPTION

This is an adapter for Log::Any, tailored towards the needs of Zonemaster Backend.

The following attributes are supported.

file

A string. The location of the log file to use. Default: -.

The special value - sends output to stdout or stderr depending on the stderr attribute.

stderr

A boolean. True means log to stderr. False means log to stdout. Default: false.

Ignored if file is anything other than -.

log_level

The threshold for emitting log entries. Default: info.

The allowed values are specified at "LOG-LEVELS" in Log::Any.

json

A boolean. When true, logs are written in JSON format. Default: false.

with_timestamp

A boolean. Controls the inclusion of timestamp log entries. Default: true.

with_pid

A boolean. Controls the inclusion of PID in log entries. Default: true.