line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
########################################################################### |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Priorities.pm |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Copyright (C) 1999 Raphael Manfredi. |
6
|
|
|
|
|
|
|
# Copyright (C) 2002-2015 Mark Rogaski, mrogaski@cpan.org; |
7
|
|
|
|
|
|
|
# all rights reserved. |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# See the README file included with the |
10
|
|
|
|
|
|
|
# distribution for license information. |
11
|
|
|
|
|
|
|
# |
12
|
|
|
|
|
|
|
########################################################################## |
13
|
|
|
|
|
|
|
|
14
|
14
|
|
|
14
|
|
68
|
use strict; |
|
14
|
|
|
|
|
21
|
|
|
14
|
|
|
|
|
585
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
######################################################################## |
17
|
|
|
|
|
|
|
package Log::Agent::Priorities; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
require Exporter; |
20
|
14
|
|
|
14
|
|
72
|
use AutoLoader 'AUTOLOAD'; |
|
14
|
|
|
|
|
24
|
|
|
14
|
|
|
|
|
68
|
|
21
|
14
|
|
|
14
|
|
487
|
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS @LEVELS); |
|
14
|
|
|
0
|
|
24
|
|
|
14
|
|
|
|
|
3766
|
|
22
|
|
|
|
|
|
|
@ISA = qw(Exporter); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
@LEVELS = qw(NONE EMERG ALERT CRIT ERROR WARN NOTICE INFO DEBUG); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
@EXPORT = qw(priority_level); |
27
|
|
|
|
|
|
|
@EXPORT_OK = qw(prio_from_level level_from_prio); |
28
|
|
|
|
|
|
|
push(@EXPORT_OK, @LEVELS); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
%EXPORT_TAGS = (LEVELS => \@LEVELS); |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
0
|
BEGIN { |
33
|
|
|
|
|
|
|
sub NONE () {-1} |
34
|
|
|
|
|
|
|
sub EMERG () {0} |
35
|
|
|
|
|
|
|
sub ALERT () {1} |
36
|
|
|
|
|
|
|
sub CRIT () {2} |
37
|
|
|
|
|
|
|
sub ERROR () {3} |
38
|
|
|
|
|
|
|
sub WARN () {4} |
39
|
|
|
|
|
|
|
sub NOTICE () {6} |
40
|
|
|
|
|
|
|
sub INFO () {8} |
41
|
|
|
|
|
|
|
sub DEBUG () {10} |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
14
|
|
|
14
|
|
67
|
use vars qw(@basic_prio %basic_level); |
|
14
|
|
|
|
|
28
|
|
|
14
|
|
|
|
|
1561
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
@basic_prio = qw( |
47
|
|
|
|
|
|
|
emergency |
48
|
|
|
|
|
|
|
alert |
49
|
|
|
|
|
|
|
critical |
50
|
|
|
|
|
|
|
error |
51
|
|
|
|
|
|
|
warning warning |
52
|
|
|
|
|
|
|
notice notice |
53
|
|
|
|
|
|
|
info info); |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
%basic_level = ( |
56
|
|
|
|
|
|
|
'em' => EMERG, # emergency |
57
|
|
|
|
|
|
|
'al' => ALERT, # alert |
58
|
|
|
|
|
|
|
'cr' => CRIT, # critical |
59
|
|
|
|
|
|
|
'er' => ERROR, # error |
60
|
|
|
|
|
|
|
'wa' => WARN, # warning |
61
|
|
|
|
|
|
|
'no' => NOTICE, # notice |
62
|
|
|
|
|
|
|
'in' => INFO, # info |
63
|
|
|
|
|
|
|
'de' => DEBUG, # debug |
64
|
|
|
|
|
|
|
); |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |
67
|
|
|
|
|
|
|
__END__ |