[lxc-devel] [lxd/master] Fix error message when log path is missing

stgraber on Github lxc-bot at linuxcontainers.org
Wed Aug 30 05:50:03 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170830/bdd07772/attachment.bin>
-------------- next part --------------
From 8fe9c1948b58320a4201019c27be0c676cdb3820 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Wed, 30 Aug 2017 01:49:27 -0400
Subject: [PATCH] Fix error message when log path is missing
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 lxd/main_subcommand.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lxd/main_subcommand.go b/lxd/main_subcommand.go
index 23c868e5b..2d634dd59 100644
--- a/lxd/main_subcommand.go
+++ b/lxd/main_subcommand.go
@@ -91,10 +91,11 @@ func setupSubCommand(context *cmd.Context, args *Args, handler log.Handler) erro
 	if args.Syslog {
 		syslog = "lxd"
 	}
+
 	var err error
 	logger.Log, err = logging.GetLogger(syslog, args.Logfile, args.Verbose, args.Debug, handler)
 	if err != nil {
-		context.Output("%s", err)
+		context.Output("%v\n", err)
 		return err
 	}
 


More information about the lxc-devel mailing list