]> git.proxmox.com Git - mirror_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:25:11 +0000 (00:25 -0400)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/start.c

index ae59c6711035c40f51c9f24e8f1b2f86f37aede2..3baed693a36801c0af4e1f26143471e51453537d 100644 (file)
@@ -631,6 +631,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");