[pve-devel] applied: [pve-common] PVE::CLIHandler - allow to set LOG ID with $ENV{PVE_LOG_ID}

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Jul 4 11:28:00 CEST 2018


On 7/4/18 10:52 AM, Dietmar Maurer wrote:
> We use this with 'pvesh'.
> 
> Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
> ---
>  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"};
> 

applied




More information about the pve-devel mailing list