[CRIU] [PATCH] RPC: fix wrong log_level handling

Andrei Vagin avagin at virtuozzo.com
Mon Sep 10 22:27:24 MSK 2018


Applied, thanks!

On Thu, Sep 06, 2018 at 11:27:43AM +0200, Adrian Reber wrote:
> From: Adrian Reber <areber at redhat.com>
> 
> In RPC mode the log_level was always reset to the default log level of 2, if no
> configuration file was used.
> 
> This saves the log level set via RPC in opts.log_level and a configuration file
> can overwrite it later, but if it is only set via RPC this value is not ignored
> now.
> 
> Signed-off-by: Adrian Reber <areber at redhat.com>
> ---
>  criu/cr-service.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/criu/cr-service.c b/criu/cr-service.c
> index 643aba9cf..d7f12b9c0 100644
> --- a/criu/cr-service.c
> +++ b/criu/cr-service.c
> @@ -363,6 +363,8 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
>  		SET_CHAR_OPTS(output, DEFAULT_LOG_FILENAME);
>  	}
>  
> +	/* This is needed later to correctly set the log_level */
> +	opts.log_level = req->log_level;
>  	log_set_loglevel(req->log_level);
>  	if (log_init(opts.output) == -1) {
>  		pr_perror("Can't initiate log");
> -- 
> 2.17.1
> 


More information about the CRIU mailing list