[lxc-devel] [lxd/master] network: do not print writer struct on error

brauner on Github lxc-bot at linuxcontainers.org
Thu Jul 5 23:29:14 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 551 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180705/3c5866c1/attachment.bin>
-------------- next part --------------
From 69e842e1193e59908451b19d5d1673cc3891852d Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Fri, 6 Jul 2018 01:27:29 +0200
Subject: [PATCH] network: do not print writer struct on error

This string

&{%!s(*os.file=&{{{1 0 0} -1 {0} <nil> 1 true true true true} master <nil> false false})}

is not helpful at all so stop dumping it to the log. It is just irritating.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
 shared/network.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/shared/network.go b/shared/network.go
index f47f75cea..88fa4c3cf 100644
--- a/shared/network.go
+++ b/shared/network.go
@@ -325,7 +325,7 @@ func defaultWriter(conn *websocket.Conn, w io.WriteCloser, writeDone chan<- bool
 	for {
 		mt, r, err := conn.NextReader()
 		if err != nil {
-			logger.Debugf("Got error getting next reader %s, %s", err, w)
+			logger.Debugf("Got error getting next reader %s", err)
 			break
 		}
 


More information about the lxc-devel mailing list