From 23108aaa5df503f09b8c4efc16c41232c5b358b8 Mon Sep 17 00:00:00 2001 From: Richard Littauer Date: Fri, 6 May 2016 19:31:51 -0400 Subject: [PATCH] Marshal log ls better This uses a stringList to output each log command as an item in an array in an object called Strings, instead of using the MessageOutput func. This closes #2636. License: MIT Signed-off-by: Richard Littauer --- core/commands/log.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/commands/log.go b/core/commands/log.go index efeafc6d2..6cdf518f8 100644 --- a/core/commands/log.go +++ b/core/commands/log.go @@ -3,7 +3,6 @@ package commands import ( "fmt" "io" - "strings" logging "gx/ipfs/QmaDNZ4QMdBdku1YZWBysufYyoQt1negQGNav6PLYarbY8/go-log" @@ -82,13 +81,12 @@ subsystems of a running daemon. `, }, Run: func(req cmds.Request, res cmds.Response) { - output := strings.Join(logging.GetSubsystems(), "\n") - res.SetOutput(&MessageOutput{output + "\n"}) + res.SetOutput(&stringList{logging.GetSubsystems()}) }, Marshalers: cmds.MarshalerMap{ - cmds.Text: MessageTextMarshaler, + cmds.Text: stringListMarshaler, }, - Type: MessageOutput{}, + Type: stringList{}, } var logTailCmd = &cmds.Command{