use Try::Tiny;
use System::Introspector::Report::Source;
use System::Introspector::Report::Config;
-use Log::Contextual qw( :log set_logger );
-use Log::Contextual::SimpleLogger;
+use System::Introspector::Report::Logging qw( :log router );
GetOptions(
's|storage=s' => \my $storage_dir,
die "$0 requires --config (-c) to be specified\n"
unless defined $config_file;
-my @additional_log_levels = qw( debug trace );
-my $logger = Log::Contextual::SimpleLogger->new({
- levels => [
- qw( error fatal warn info ),
- grep { defined }
- @additional_log_levels[0 .. (($log_verbose || 0) - 1)],
- ],
-});
-set_logger $logger;
-
my $timed = sub { sprintf shift, scalar localtime };
log_info { 'Starting at %s'->$timed };