Unverified Commit a9c51a82 by Stéphane Graber Committed by GitHub

Merge pull request #2004 from brauner/2017-12-06/fix_log_env_variable

start: set loglevel correctly
parents a144d288 4a03ded4
......@@ -572,6 +572,7 @@ on_error:
int lxc_init(const char *name, struct lxc_handler *handler)
{
const char *loglevel;
struct lxc_conf *conf = handler->conf;
lsm_init();
......@@ -612,8 +613,9 @@ int lxc_init(const char *name, struct lxc_handler *handler)
if (setenv("LXC_CGNS_AWARE", "1", 1))
SYSERROR("Failed to set environment variable LXC_CGNS_AWARE=1.");
if (setenv("LXC_LOG_LEVEL", lxc_log_priority_to_string(handler->conf->loglevel), 1))
SYSERROR("Failed to set environment variable LXC_CGNS_AWARE=1.");
loglevel = lxc_log_priority_to_string(lxc_log_get_level());
if (setenv("LXC_LOG_LEVEL", loglevel, 1))
SYSERROR("Failed to set environment variable LXC_LOG_LEVEL=%s", loglevel);
/* End of environment variable setup for hooks. */
TRACE("set environment variables");
......
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