Log4perl/JavaMap/NTEventLogAppender.pm untested

filter: Statementstmt 0.0% 0 / 14 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 22 CC 3 SCAR 20.8
CC
3
Cov
0%
new
12.0
BEGIN
2.0
BEGIN
2.0
CRAP 8.0
1 package Log::Log4perl::JavaMap::NTEventLogAppender;
2  
3 use Carp;
4 use strict;
5  
6  
7  
8 sub new {
9 my ($class, $appender_name, $data) = @_;
10 my $stderr;
11  
12 my ($source, #
13 );
14  
15 if (defined $data->{Source}{value}) {
16 $source = $data->{Source}{value}
17 }elsif (defined $data->{source}{value}){
18 $source = $data->{source}{value};
19 }else{
20 $source = 'user';
21 }
22  
23
24 return Log::Log4perl::Appender->new("Log::Dispatch::Win32EventLog",
25 name => $appender_name,
26 source => $source,
27 min_level => 'debug',
28 );
29 }
30  
31 1;
32  
33 =encoding utf8
34  
35 =head1 NAME
36  
37 Log::Log4perl::JavaMap::NTEventLogAppender - wraps Log::Dispatch::Win32EventLog
38  
39 =head1 DESCRIPTION
40  
41 This maps log4j's NTEventLogAppender to Log::Dispatch::Win32EventLog
42  
43 Possible config properties for log4j NTEventLogAppender are
44  
45 Source
46  
47 Possible config properties for Log::Dispatch::Win32EventLog are
48  
49 source
50  
51 Boy, that was hard.
52  
53 =head1 SEE ALSO
54  
55 http://jakarta.apache.org/log4j/docs/
56  
57 Log::Log4perl::Javamap
58  
59 =head1 LICENSE
60  
61 Copyright 2002-2026 by Mike Schilli E<lt>m@perlmeister.comE<gt>
62 and Kevin Goess E<lt>cpan@goess.orgE<gt>.
63  
64 This library is free software; you can redistribute it and/or modify
65 it under the same terms as Perl itself.