From 57d441516345f6142e4660b4801672be2dbfe28b Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 4 Jul 2018 10:52:26 +0200 Subject: [PATCH 1/1] PVE::CLIHandler - allow to set LOG ID with $ENV{PVE_LOG_ID} We use this with 'pvesh'. Signed-off-by: Dietmar Maurer --- src/PVE/CLIHandler.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index 0b93a4b..6eab3c6 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -616,7 +616,8 @@ sub run_cli_handler { $exename = &$get_exe_name($class); - initlog($exename); + my $logid = $ENV{PVE_LOG_ID} || $exename; + initlog($logid); no strict 'refs'; $cmddef = ${"${class}::cmddef"}; -- 2.39.2