Esempio n. 1
0
// SetupLogger configures glog from the logging-related command line flags.
func SetupLogger(ctx *cli.Context) {
	glog.SetV(ctx.GlobalInt(VerbosityFlag.Name))
	glog.CopyStandardLogTo("INFO")
	glog.SetToStderr(true)
	if ctx.GlobalIsSet(LogFileFlag.Name) {
		logger.New("", ctx.GlobalString(LogFileFlag.Name), ctx.GlobalInt(VerbosityFlag.Name))
	}
	if ctx.GlobalIsSet(VMDebugFlag.Name) {
		vm.Debug = ctx.GlobalBool(VMDebugFlag.Name)
	}
}
Esempio n. 2
0
// Verbosity updates the node's logging verbosity. Note, due to the lack of fine
// grained contextual loggers, this will update the verbosity level for the entire
// process, not just this node instance.
func (api *PrivateDebugAPI) Verbosity(level int) {
	glog.SetV(level)
}