1Dancer2::Logger::File(3U)ser Contributed Perl DocumentatiDoanncer2::Logger::File(3)
2
3
4
6 Dancer2::Logger::File - file-based logging engine for Dancer2
7
9 version 0.301004
10
12 This is a logging engine that allows you to save your logs to files on
13 disk.
14
15 Logs are not automatically rotated. Use a log rotation tool like
16 "logrotate" in "copytruncate" mode.
17
19 log($level, $message)
20 Writes the log message to the file.
21
23 The setting "logger" should be set to "File" in order to use this
24 logging engine in a Dancer2 application.
25
26 The follow attributes are supported:
27
28 • "log_dir"
29
30 Directory path to hold log files.
31
32 Defaults to logs in the application directory
33
34 • "file_name"
35
36 The name of the log file.
37
38 Defaults to the environment name with a .log suffix
39
40 Here is an example configuration that use this logger and stores logs
41 in /var/log/myapp:
42
43 logger: "File"
44
45 engines:
46 logger:
47 File:
48 log_dir: "/var/log/myapp"
49 file_name: "myapp.log"
50
52 Dancer Core Developers
53
55 This software is copyright (c) 2021 by Alexis Sukrieh.
56
57 This is free software; you can redistribute it and/or modify it under
58 the same terms as the Perl 5 programming language system itself.
59
60
61
62perl v5.34.0 2021-07-22 Dancer2::Logger::File(3)