log.go 393 Bytes
Newer Older
Henry's avatar
Henry committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
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
	}

Henry's avatar
Henry committed
16
	log.Info("Changed LogLevel of %q to %q", args[0], args[1])
Henry's avatar
Henry committed
17 18
	return nil
}