mirror of
https://git.proxmox.com/git/pve-guest-common
synced 2025-08-10 02:29:43 +00:00
abstract migrate: rename tstr to prefix
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
2b062714d8
commit
fb2bf95ebb
@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user