From: Dietmar Maurer Date: Wed, 4 Jul 2018 08:52:26 +0000 (+0200) Subject: PVE::CLIHandler - allow to set LOG ID with $ENV{PVE_LOG_ID} X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=57d441516345f6142e4660b4801672be2dbfe28b;ds=sidebyside PVE::CLIHandler - allow to set LOG ID with $ENV{PVE_LOG_ID} We use this with 'pvesh'. Signed-off-by: Dietmar Maurer --- 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"};