1Dancer2::Core::Role::LoUgsgeerr(C3o)ntributed Perl DocumDeanntcaetri2o:n:Core::Role::Logger(3)
2
3
4

NAME

6       Dancer2::Core::Role::Logger - Role for logger engines
7

VERSION

9       version 0.208001
10

DESCRIPTION

12       Any class that consumes this role will be able to implement to write
13       log messages.
14
15       In order to implement this role, the consumer must implement the "log"
16       method. This method will receives as argument the "level" and the
17       "message".
18

ATTRIBUTES

20   auto_encoding_charset
21       Charset to use when writing a message.
22
23   app_name
24       Name of the application. Can be used in the message.
25
26   log_format
27       This is a format string (or a preset name) to specify the log format.
28
29       The possible values are:
30
31       %h  host emitting the request
32
33       %t  date (local timezone, formatted like %d/%b/%Y %H:%M:%S)
34
35       %T  date (local timezone, formatted like %Y-%m-%d %H:%M:%S)
36
37       %u  date (UTC timezone, formatted like %d/%b/%Y %H:%M:%S)
38
39       %U  date (UTC timezone, formatted like %Y-%m-%d %H:%M:%S)
40
41       %P  PID
42
43       %L  log level
44
45       %D  timer
46
47       %m  message
48
49       %f  file name that emit the message
50
51       %l  line from the file
52
53       %i  request ID
54
55       %{$fmt}t
56           timer formatted with a valid time format
57
58       %{header}h
59           header value
60
61   log_level
62       Level to use by default.
63

METHODS

65   core
66       Log messages as core.
67
68   debug
69       Log messages as debug.
70
71   info
72       Log messages as info.
73
74   warning
75       Log messages as warning.
76
77   error
78       Log messages as error.
79
80   format_message
81       Provides a common message formatting.
82

CONFIGURATION

84       The logger configuration variable tells Dancer2 which engine to use.
85
86       You can change it either in your config.yml file:
87
88           # logging to console
89           logger: "console"
90
91       The log format can also be configured, please see "log_format" in
92       Dancer2::Core::Role::Logger for details.
93

AUTHOR

95       Dancer Core Developers
96
98       This software is copyright (c) 2019 by Alexis Sukrieh.
99
100       This is free software; you can redistribute it and/or modify it under
101       the same terms as the Perl 5 programming language system itself.
102
103
104
105perl v5.30.0                      2019-08-05    Dancer2::Core::Role::Logger(3)
Impressum