summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-04-02 15:04:06 +0200
committerFlorian Pritz <bluewind@xinu.at>2017-04-02 22:31:49 +0200
commit27c31cbdd5f14f66457960c66e09c6c6d0f5baab (patch)
tree12478cf4be2bd012e265371be7db91e6866b1dd6
parent59147c210c99f056176228c3eef432a90ca690bf (diff)
downloadApp-BorgRestore-27c31cbdd5f14f66457960c66e09c6c6d0f5baab.tar.gz
App-BorgRestore-27c31cbdd5f14f66457960c66e09c6c6d0f5baab.tar.xz
Left jusitfy package name and line number in debug log
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xscript/borg-restore.pl4
1 files changed, 3 insertions, 1 deletions
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();