on debug level verbosity, also print the line number

This commit is contained in:
Johannes 'josch' Schauer 2020-01-04 00:37:49 +01:00
parent 170344a611
commit ed0b5069ce
Signed by: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -89,7 +89,8 @@ sub debug {
return; return;
} }
my $msg = shift; my $msg = shift;
$msg = "D: $msg"; my ($package, $filename, $line) = caller;
$msg = "D: $PID $line $msg";
if ( -t STDERR ) { if ( -t STDERR ) {
$msg = colored($msg, 'clear') $msg = colored($msg, 'clear')
} }
@ -101,6 +102,10 @@ sub info {
return; return;
} }
my $msg = shift; my $msg = shift;
if ($verbosity_level >= 3) {
my ($package, $filename, $line) = caller;
$msg = "$PID $line $msg"
}
$msg = "I: $msg"; $msg = "I: $msg";
if ( -t STDERR ) { if ( -t STDERR ) {
$msg = colored($msg, 'green') $msg = colored($msg, 'green')