Dancer2::Logger::File(3pm)

Dancer2::Logger::File3pm

File-based logging engine for dancer2

Version

version 1.1.2

Overview

This is a logging engine that allows you to save your logs to files on disk.

Logs are not automatically rotated. Use a log rotation tool like "logrotate" in "copytruncate" mode.

Methods

log($level, $message)

Writes the log message to the file.

Configuration

The setting "logger" should be set to "File" in order to use this logging engine in a Dancer2 application.

The follow attributes are supported:

•

"log_dir"

Directory path to hold log files.

Defaults to logs in the application directory

•

"file_name"

The name of the log file.

Defaults to the environment name with a .log suffix

Here is an example configuration that use this logger and stores logs in /var/log/myapp:

  logger: "File"
  engines:
    logger:
      File:
        log_dir: "/var/log/myapp"
        file_name: "myapp.log"

Releases

6 releases since Debian 8 (Jessie); the text changed 5 times.

  1. 8
  2. 9
  3. 10
  4. 11
  5. 12
  6. 13

Author

Dancer Core Developers

From libdancer2-perl 1.1.2+dfsg-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.