File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -7,12 +7,14 @@ use v5.36;
77use MetaCPAN::Logger qw< :log :dlog > ;
88use Search::Elasticsearch;
99
10- use MetaCPAN::Ingest qw< config handle_error > ;
10+ use MetaCPAN::Ingest qw< config handle_error is_dev > ;
1111
1212sub new ( $class , %args ) {
13- my $mode = $args {mode } // " local" ;
1413 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
1618
1719 my $config = config;
1820 my $config_node =
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ sub home () {
196196
197197# TODO: there must be a better way
198198sub is_dev () {
199- return $ENV {PLACK_ENV } =~ / dev/ ;
199+ return ( $ENV {PLACK_ENV } && $ENV { PLACK_ENV } =~ / dev/ ) ;
200200}
201201
202202sub 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