1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-04 13:07:46 +08:00
Files
kubo/core/commands/log.go
2014-10-15 13:34:38 +02:00

19 lines
393 B
Go

package commands
import (
"io"
"github.com/jbenet/go-ipfs/core"
u "github.com/jbenet/go-ipfs/util"
)
// Log changes the log level of a subsystem
func Log(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error {
if err := u.SetLogLevel(args[0], args[1]); err != nil {
return err
}
log.Info("Changed LogLevel of %q to %q", args[0], args[1])
return nil
}