From 688d118c7e0d439691e84fc6e068ab3e19da5185 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 7 Apr 2015 14:57:04 +0200 Subject: Updated logging --- cmd/utils/flags.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cmd/utils/flags.go') diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 0609bcf75..51844a68e 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -194,6 +194,11 @@ var ( Name: "logtostderr", Usage: "Logs are written to standard error instead of to files.", } + LogVModuleFlag = cli.GenericFlag{ + Name: "vmodule", + Usage: "The syntax of the argument is a comma-separated list of pattern=N, where pattern is a literal file name (minus the \".go\" suffix) or \"glob\" pattern and N is a V level.", + Value: glog.GetVModule(), + } ) func GetNAT(ctx *cli.Context) nat.Interface { @@ -227,6 +232,8 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config { glog.SetV(ctx.GlobalInt(LogLevelFlag.Name)) // Set the log type glog.SetToStderr(ctx.GlobalBool(LogToStdErrFlag.Name)) + // Set the log dir + glog.SetLogDir(ctx.GlobalString(LogFileFlag.Name)) return ð.Config{ Name: common.MakeName(clientID, version), -- cgit v1.2.3