ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent/Log.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent/Log.pm (file contents):
Revision 1.41 by root, Thu Sep 1 04:07:18 2011 UTC vs.
Revision 1.42 by root, Thu Sep 1 22:38:11 2011 UTC

75numerical value". 75numerical value".
76 76
77Instead of specifying levels by name you can also specify them by aliases: 77Instead of specifying levels by name you can also specify them by aliases:
78 78
79 LVL NAME SYSLOG PERL NOTE 79 LVL NAME SYSLOG PERL NOTE
80 1 fatal emerg exit aborts program! 80 1 fatal emerg exit system unusable, aborts program!
81 2 alert 81 2 alert failure in primary system
82 3 critical crit 82 3 critical crit failure in backup system
83 4 error err die 83 4 error err die non-urgent program errors, a bug
84 5 warn warning 84 5 warn warning possible problem, not necessarily error
85 6 note notice 85 6 note notice unusual conditions
86 7 info 86 7 info normal messages, no action required
87 8 debug 87 8 debug debugging messages for development
88 9 trace 88 9 trace copious tracing output
89 89
90As you can see, some logging levels have multiple aliases - the first one 90As you can see, some logging levels have multiple aliases - the first one
91is the "official" name, the second one the "syslog" name (if it differs) 91is the "official" name, the second one the "syslog" name (if it differs)
92and the third one the "perl" name, suggesting (only!) that you log C<die> 92and the third one the "perl" name, suggesting (only!) that you log C<die>
93messages at C<error> priority. 93messages at C<error> priority. The NOTE column tries to provide some
94rationale on how to chose a logging level.
95
96As a rough guideline, levels 1..3 are primarily meant for users of
97the program (admins, staff), and are the only logged to STDERR by
98default. Levels 4..6 are meant for users and developers alike, while
99levels 7..9 are usually meant for developers.
94 100
95You can normally only log a single message at highest priority level 101You can normally only log a single message at highest priority level
96(C<1>, C<fatal>), because logging a fatal message will also quit the 102(C<1>, C<fatal>), because logging a fatal message will also quit the
97program - so use it sparingly :) 103program - so use it sparingly :)
98 104

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines