From 27c31cbdd5f14f66457960c66e09c6c6d0f5baab Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 2 Apr 2017 15:04:06 +0200 Subject: Left jusitfy package name and line number in debug log Signed-off-by: Florian Pritz --- script/borg-restore.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'script') diff --git a/script/borg-restore.pl b/script/borg-restore.pl index 5a7d8f4..4d6cc0d 100755 --- a/script/borg-restore.pl +++ b/script/borg-restore.pl @@ -210,6 +210,8 @@ sub main { log4perl.appender.screenlog.stderr = 1 log4perl.appender.screenlog.layout = Log::Log4perl::Layout::PatternLayout log4perl.appender.screenlog.layout.ConversionPattern = %p %m%n + + log4perl.PatternLayout.cspec.U = sub {my \@c = caller(\$_[4]); \$c[0] =~ s/::/./g; return sprintf('%s:%s', \$c[0], \$c[2]);} "; Log::Log4perl::init( \$conf ); Log::Any::Adapter->set('Log4perl'); @@ -242,7 +244,7 @@ sub main { my $logger = Log::Log4perl->get_logger(''); $logger->level($DEBUG); Log::Log4perl->appenders()->{"screenlog"}->layout( - Log::Log4perl::Layout::PatternLayout->new("%d %8r [%30c:%-4L] %p %m%n")); + Log::Log4perl::Layout::PatternLayout->new("%d %8r [%-30U] %p %m%n")); } $app = App::BorgRestore->new(); -- cgit v1.2.3-24-g4f1b