]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
start: pass LXC_LOG_LEVEL to hooks
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 13 Sep 2017 03:02:50 +0000 (05:02 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Sun, 24 Sep 2017 04:41:30 +0000 (00:41 -0400)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/start.c

index fd7ba46d1959f06f0792a2a5a85b9eace31335b5..eedbae50cd525d77a131f6f11d1dde9ebcabf18e 100644 (file)
@@ -628,6 +628,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.");
        /* End of environment variable setup for hooks. */
 
        TRACE("set environment variables");