From: Robert 'phaylon' Sedlacek Date: Wed, 3 Oct 2012 17:10:10 +0000 (+0000) Subject: more debug logging for startup and general run X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8c04c3914794fe151b726521df4c069c36ee7db1;p=scpubgit%2FSystem-Introspector-Report.git more debug logging for startup and general run --- diff --git a/bin/system-introspector-report b/bin/system-introspector-report index 6b1032e..636227e 100755 --- a/bin/system-introspector-report +++ b/bin/system-introspector-report @@ -5,7 +5,7 @@ use Pod::Usage; use Try::Tiny; use System::Introspector::Report::Source; use System::Introspector::Report::Config; -use Log::Contextual qw( set_logger ); +use Log::Contextual qw( :log set_logger ); use Log::Contextual::SimpleLogger; GetOptions( @@ -35,16 +35,18 @@ my $logger = Log::Contextual::SimpleLogger->new({ set_logger $logger; my $config = System::Introspector::Report::Config - ->new(config_file => $config_file); + ->new(config_file => log_debug { "Loading config '$_[0]'" } $config_file); my $source = System::Introspector::Report::Source - ->new_from_root($storage_dir); + ->new_from_root(log_debug { "Loading storage '$_[0]'" } $storage_dir); my @types = $all_reports ? $config->report_types : map [$_, {}], @report_types; +log_debug { "Generating report data" }; my @reports = $source->generate(@types); +log_debug { "Publishing report data" }; for my $publisher ($config->publishers(@publish_types)) { try { $publisher->publish(\@reports); @@ -53,6 +55,7 @@ for my $publisher ($config->publishers(@publish_types)) { print "Error during publish: $_\n"; }; } +log_debug { "Done" }; __END__