File tree 4 files changed +26
-3
lines changed
4 files changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ package Author;
8
8
use Email::Valid ();
9
9
use Encode ();
10
10
use Getopt::Long;
11
- use Log::Contextual::Easy::Default qw< :log :dlog > ;
11
+ use MetaCPAN::Logger qw< :log :dlog > ;
12
12
use URI ();
13
13
use XML::Simple qw< XMLin > ;
14
14
@@ -17,6 +17,7 @@ package Author;
17
17
author_dir
18
18
cpan_dir
19
19
diff_struct
20
+ config
20
21
> ;
21
22
22
23
# config
@@ -54,8 +55,8 @@ package Author;
54
55
my $pauseid ;
55
56
GetOptions( " pauseid=s" => \$pauseid );
56
57
57
- # ## TODO - move out
58
- $ENV { AUTHOR_UPTO } = " TRACE " ;
58
+ my $config = config();
59
+ $config -> init_logger ;
59
60
60
61
# setup
61
62
my $cpan = cpan_dir();
Original file line number Diff line number Diff line change @@ -6,10 +6,12 @@ use warnings;
6
6
use Path::Tiny qw< path > ;
7
7
use Ref::Util qw< is_ref is_plain_arrayref is_plain_hashref > ;
8
8
use LWP::UserAgent;
9
+ use MetaCPAN::Config;
9
10
10
11
use Sub::Exporter -setup => {
11
12
exports => [
12
13
qw<
14
+ config
13
15
author_dir
14
16
cpan_dir
15
17
diff_struct
@@ -18,6 +20,16 @@ use Sub::Exporter -setup => {
18
20
]
19
21
};
20
22
23
+ my $config ;
24
+ sub config {
25
+ $config //= do {
26
+ MetaCPAN::Config-> new(
27
+ name => __PACKAGE__ ,
28
+ path => path(__FILE__ )-> parent(3)-> stringify,
29
+ );
30
+ };
31
+ }
32
+
21
33
sub author_dir {
22
34
my $pauseid = shift ;
23
35
my $dir = ' id/'
Original file line number Diff line number Diff line change
1
+ log4perl.rootLogger=DEBUG, OUTPUT
2
+
3
+ log4perl.appender.OUTPUT=Log::Log4perl::Appender::Screen
4
+ log4perl.appender.OUTPUT.stderr=1
5
+
6
+ log4perl.appender.OUTPUT.layout=PatternLayout
7
+ log4perl.appender.OUTPUT.layout.ConversionPattern=[%d] [%p] %m%n
Original file line number Diff line number Diff line change
1
+ log4perl_file log4perl.conf
2
+
3
+ # cpan ./CPAN
You can’t perform that action at this time.
0 commit comments