Commit b4ab1d8c authored by Adrian Reber's avatar Adrian Reber Committed by Andrei Vagin

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: 's avatarAdrian Reber <areber@redhat.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent ab63f168
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment