The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/2395

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Older versions of lxc-create used to set log_file to "none" when a log priority
but no log file was specified on the command line. Let's restore this behavior.

Closes #2392.

Signed-off-by: Christian Brauner <[email protected]>
From 70cf33762530f36e8475504b4f764061b4513f92 Mon Sep 17 00:00:00 2001
From: Christian Brauner <[email protected]>
Date: Mon, 11 Jun 2018 13:15:48 +0200
Subject: [PATCH] tools: restore lxc-create log behavior

Older versions of lxc-create used to set log_file to "none" when a log priority
but no log file was specified on the command line. Let's restore this behavior.

Closes #2392.

Signed-off-by: Christian Brauner <[email protected]>
---
 src/lxc/tools/lxc_create.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/lxc/tools/lxc_create.c b/src/lxc/tools/lxc_create.c
index 3dd2e01b8..f8ec5ad2b 100644
--- a/src/lxc/tools/lxc_create.c
+++ b/src/lxc/tools/lxc_create.c
@@ -230,7 +230,10 @@ int main(int argc, char *argv[])
        /* Only create log if explicitly instructed */
        if (my_args.log_file || my_args.log_priority) {
                log.name = my_args.name;
-               log.file = my_args.log_file;
+               if (!my_args.log_file)
+                       log.file = "none";
+               else
+                       log.file = my_args.log_file;
                log.level = my_args.log_priority;
                log.prefix = my_args.progname;
                log.quiet = my_args.quiet;
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to