github.com/zignig/go-ipfs@v0.0.0-20141111235910-c9e5fdf55a52/cmd/ipfs/log.go (about)

     1  package main
     2  
     3  import (
     4  	flag "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/gonuts/flag"
     5  	commander "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/commander"
     6  	"github.com/jbenet/go-ipfs/core/commands"
     7  )
     8  
     9  var cmdIpfsLog = &commander.Command{
    10  	UsageLine: "log <name> <level> ",
    11  	Short:     "switch logging levels of a running daemon",
    12  	Long: `ipfs log <name> <level> - switch logging levels of a running daemon
    13  
    14     <name> is a the subsystem logging identifier. Use * for all subsystems.
    15     <level> is one of: debug, info, notice, warning, error, critical
    16  
    17  ipfs log is a utility command used to change the logging output of a running daemon.
    18  `,
    19  	Run:  logCmd,
    20  	Flag: *flag.NewFlagSet("ipfs-log", flag.ExitOnError),
    21  }
    22  
    23  var logCmd = makeCommand(command{
    24  	name:   "log",
    25  	args:   2,
    26  	flags:  nil,
    27  	online: true,
    28  	cmdFn:  commands.Log,
    29  })