We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5594c0b commit dae2aabCopy full SHA for dae2aab
lib/MetaCPAN/ES.pm
@@ -7,12 +7,14 @@ use v5.36;
7
use MetaCPAN::Logger qw< :log :dlog >;
8
use Search::Elasticsearch;
9
10
-use MetaCPAN::Ingest qw< config handle_error >;
+use MetaCPAN::Ingest qw< config handle_error is_dev >;
11
12
sub new ( $class, %args ) {
13
- my $mode = $args{mode} // "local";
14
my $node = $args{node};
15
- my $index = $args{index} // "cpan";
+ my $index = $args{index} // 'cpan';
+
16
+ my $mode = is_dev() ? 'test' : 'local';
17
+ $mode eq 'test' and Log::Log4perl::init('log4perl_test.conf'); # TODO: find a better place
18
19
my $config = config;
20
my $config_node =
log4perl_test.conf
@@ -0,0 +1 @@
1
+log4perl.logger = OFF
0 commit comments