give modules default loggers so they are usable on their own (in tests)
[scpubgit/System-Introspector-Report.git] / lib / System / Introspector / Report / Publish / MediaWiki.pm
index 2d4186a..768a465 100644 (file)
@@ -1,7 +1,13 @@
 package System::Introspector::Report::Publish::MediaWiki;
 use Moo;
 use Try::Tiny;
-use Log::Contextual qw( :log );
+use Log::Contextual::WarnLogger;
+use Log::Contextual qw( :log ),
+  -default_logger => Log::Contextual::WarnLogger->new({
+    env_prefix => 'SI_REPORT_MEDIAWIKI',
+    levels      => [qw( error fatal warn )],
+  });
+
 use aliased 'System::Introspector::Report::Publish::MediaWiki::Connection';
 
 has page_options => (