File tree 3 files changed +7
-4
lines changed 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -7,12 +7,14 @@ use v5.36;
7
7
use MetaCPAN::Logger qw< :log :dlog > ;
8
8
use Search::Elasticsearch;
9
9
10
- use MetaCPAN::Ingest qw< config handle_error > ;
10
+ use MetaCPAN::Ingest qw< config handle_error is_dev > ;
11
11
12
12
sub new ( $class , %args ) {
13
- my $mode = $args {mode } // " local" ;
14
13
my $node = $args {node };
15
- my $index = $args {index } // " cpan" ;
14
+ my $index = $args {index } // ' cpan' ;
15
+
16
+ my $mode = is_dev() ? ' test' : ' local' ;
17
+ $mode eq ' test' and Log::Log4perl::init(' log4perl_test.conf' ); # TODO: find a better place
16
18
17
19
my $config = config;
18
20
my $config_node =
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ sub home () {
196
196
197
197
# TODO: there must be a better way
198
198
sub is_dev () {
199
- return $ENV {PLACK_ENV } =~ / dev/ ;
199
+ return ( $ENV {PLACK_ENV } && $ENV { PLACK_ENV } =~ / dev/ ) ;
200
200
}
201
201
202
202
sub minion () {
Original file line number Diff line number Diff line change
1
+ log4perl.logger = OFF
You can’t perform that action at this time.
0 commit comments