2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

RPC: fix wrong log_level handling

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@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Adrian Reber
2018-09-06 11:27:43 +02:00
committed by Andrei Vagin
parent ab63f168ac
commit b4ab1d8cba

View File

@@ -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");