提交 f4a5bf50 作者: Jeromy Johnson

Merge pull request #2637 from ipfs/feature/2636-marshal-log-ls

Marshal log ls better
...@@ -3,7 +3,6 @@ package commands ...@@ -3,7 +3,6 @@ package commands
import ( import (
"fmt" "fmt"
"io" "io"
"strings"
logging "gx/ipfs/QmaDNZ4QMdBdku1YZWBysufYyoQt1negQGNav6PLYarbY8/go-log" logging "gx/ipfs/QmaDNZ4QMdBdku1YZWBysufYyoQt1negQGNav6PLYarbY8/go-log"
...@@ -82,13 +81,12 @@ subsystems of a running daemon. ...@@ -82,13 +81,12 @@ subsystems of a running daemon.
`, `,
}, },
Run: func(req cmds.Request, res cmds.Response) { Run: func(req cmds.Request, res cmds.Response) {
output := strings.Join(logging.GetSubsystems(), "\n") res.SetOutput(&stringList{logging.GetSubsystems()})
res.SetOutput(&MessageOutput{output + "\n"})
}, },
Marshalers: cmds.MarshalerMap{ Marshalers: cmds.MarshalerMap{
cmds.Text: MessageTextMarshaler, cmds.Text: stringListMarshaler,
}, },
Type: MessageOutput{}, Type: stringList{},
} }
var logTailCmd = &cmds.Command{ var logTailCmd = &cmds.Command{
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论