logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Author

       Dancer Core Developers

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"

Description

       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.

Name

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

Version

       version 1.1.2

See Also