line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::DTO::GELF::Types; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: Special types for log level conversion |
4
|
|
|
|
|
|
|
our $VERSION = '1.5'; # VERSION 1.5 |
5
|
|
|
|
|
|
|
our $VERSION=1.5; |
6
|
5
|
|
|
|
|
36
|
use MooseX::Types -declare => [ |
7
|
|
|
|
|
|
|
qw( |
8
|
|
|
|
|
|
|
LogLevel |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
) |
11
|
5
|
|
|
5
|
|
2217
|
]; |
|
5
|
|
|
|
|
168128
|
|
12
|
|
|
|
|
|
|
|
13
|
5
|
|
|
5
|
|
25384
|
use MooseX::Types::Moose qw/Int Str/; |
|
5
|
|
|
|
|
86290
|
|
|
5
|
|
|
|
|
46
|
|
14
|
|
|
|
|
|
|
|
15
|
5
|
|
|
5
|
|
27523
|
use Readonly; |
|
5
|
|
|
|
|
14824
|
|
|
5
|
|
|
|
|
651
|
|
16
|
|
|
|
|
|
|
Readonly my %LOGLEVEL_MAP => ( |
17
|
|
|
|
|
|
|
DEBUG => 0, |
18
|
|
|
|
|
|
|
INFO => 1, |
19
|
|
|
|
|
|
|
NOTICE => 2, |
20
|
|
|
|
|
|
|
WARNING => 3, |
21
|
|
|
|
|
|
|
ERROR => 4, |
22
|
|
|
|
|
|
|
CRITICAL => 5, |
23
|
|
|
|
|
|
|
ALERT => 6, |
24
|
|
|
|
|
|
|
EMERGENCY => 8 |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
subtype LogLevel, as Int; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
coerce LogLevel, from Str, via { $LOGLEVEL_MAP{ uc $_ } // $_; }; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=pod |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=encoding UTF-8 |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Data::DTO::GELF::Types - Special types for log level conversion |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 VERSION |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
version 1.5 |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 AUTHOR |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Brandon "Dimentox Travanti" Husbands <xotmid@gmail.com> |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
This software is copyright (c) 2017 by Brandon "Dimentox Travanti" Husbands. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
56
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=cut |