DOKK / manpages / debian 10 / libdancer2-perl / Dancer2::Logger::File.3pm.en
Dancer2::Logger::File(3pm) User Contributed Perl Documentation Dancer2::Logger::File(3pm)

Dancer2::Logger::File - file-based logging engine for Dancer2

version 0.207000

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.

Writes the log message to the file.

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"

Dancer Core Developers

This software is copyright (c) 2018 by Alexis Sukrieh.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2018-12-23 perl v5.28.1