This helps correlate our debug logs with other log files for easier debugging when making API calls.
Signed-off-by: Laurențiu Leahu-Vlăducu <[email protected]> --- src/PVE/APIServer/AnyEvent.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm index 59bc184..cdc82b2 100644 --- a/src/PVE/APIServer/AnyEvent.pm +++ b/src/PVE/APIServer/AnyEvent.pm @@ -76,7 +76,9 @@ sub dprint { my ($pkg, $pkgfile, $line, $sub) = caller(1); $sub =~ s/^(?:.+::)+//; - print "worker[$$]: $pkg +$line: $sub: $message\n"; + my ($secs, $microsecs) = gettimeofday(); + my $timestr = strftime("%F %T", localtime($secs)) . sprintf(".%06d", $microsecs); + print "$timestr | worker[$$]: $pkg +$line: $sub: $message\n"; } sub log_request { -- 2.47.3 _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
