1Dancer::Logger::AbstracUts(e3r)Contributed Perl DocumentDaatnicoenr::Logger::Abstract(3)
2
3
4

NAME

6       Dancer::Logger::Abstract - Abstract logging engine for Dancer
7

VERSION

9       version 1.3513
10

SYNOPSIS

12       In your configuration file:
13
14           # default
15           logger_format: simple
16           # [1234] debug @0.12> [hit #123]message from your log in File.pm line 12
17
18           # custom
19           logger_format: %m %{%H:%M}t [%{accept_type}h]
20           # message from your log [11:59] [text/html]
21

DESCRIPTION

23       This is an abstract logging engine that provides loggers with basic
24       functionality and some sanity checking.
25

CONFIGURATION

27   logger_format
28       This is a format string (or a preset name) to specify the log format.
29
30       The possible values are:
31
32       %h  host emitting the request
33
34       %t  date (local timezone, formatted like %d/%b/%Y %H:%M:%S)
35
36       %T  date (local timezone, formatted like %Y-%m-%d %H:%M:%S)
37
38       %u  date (UTC timezone, formatted like %d/%b/%Y %H:%M:%S)
39
40       %U  date (UTC timezone, formatted like %Y-%m-%d %H:%M:%S)
41
42       %P  PID
43
44       %L  log level
45
46       %D  timer
47
48       %m  message
49
50       %f  file name that emit the message
51
52       %l  line from the file
53
54       %i  request ID
55
56       %{$fmt}t
57           timer formatted with a valid time format
58
59       %{header}h
60           header value
61
62       There is currently a single preset log format:
63
64       simple
65           will format the message like: [%P] %L @%D> %i%m in %f l. %l
66

METHODS

68   format_message
69       Provides a common message formatting.
70
71   core
72       Logs messages as core.
73
74   debug
75       Logs messages as debug.
76
77   warning
78       Logs messages as warning.
79
80   error
81       Logs messages as error.
82
83   info
84       Logs messages as info.
85
86   _log
87       A method to override. If your logger does not provide this, it will
88       cause the application to die.
89
90   _should
91       Checks a certain level number against a certain level type (core,
92       debug, info warning, error).
93

AUTHOR

95       Dancer Core Developers
96
98       This software is copyright (c) 2010 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.32.0                      2020-07-28       Dancer::Logger::Abstract(3)
Impressum