fixed log levels
[scpubgit/System-Introspector-Report.git] / lib / System / Introspector / Report / Source.pm
index e71d075..ea988b1 100644 (file)
@@ -3,6 +3,12 @@ use Moo;
 use JSON::PP;
 use IO::All;
 use Module::Runtime qw( use_module );
+use Log::Contextual::WarnLogger;
+use Log::Contextual qw( :log ),
+  -default_logger => Log::Contextual::WarnLogger->new({
+    env_prefix => 'SI_REPORT_SOURCE',
+    levels      => [qw( error warn info debug trace )],
+  });
 
 my $_json = JSON::PP->new->utf8->relaxed->allow_nonref;
 
@@ -29,6 +35,7 @@ sub generate {
     my ($id, $path) = @$dir_spec;
     my $data = $self->_load_dataset($path, $required)
       or next;
+    log_trace { "loading node '$id' from '$path'" };
     $_->collect_from($id, $data)
       for @generators;
   }