abstract migrate: rename tstr to prefix

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2023-01-12 13:00:33 +01:00
parent 2b062714d8
commit fb2bf95ebb

View File

@ -18,15 +18,14 @@ my $msg2text = sub {
chomp $msg;
return '' if !$msg;
my $prefix = strftime("%F %H:%M:%S", localtime);
my $res = '';
my $tstr = strftime("%F %H:%M:%S", localtime);
foreach my $line (split (/\n/, $msg)) {
if ($level eq 'err') {
$res .= "$tstr ERROR: $line\n";
$res .= "$prefix ERROR: $line\n";
} else {
$res .= "$tstr $line\n";
$res .= "$prefix $line\n";
}
}