From 5ac875b097a55c75a7e3da3443ef9fe64fc87846 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 22 Aug 2014 12:40:15 +0200 Subject: Set log level of std logger as well. (since gui logging is disabled) --- utils/cmd.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'utils') diff --git a/utils/cmd.go b/utils/cmd.go index 3f3948d60..83f3ec0b6 100644 --- a/utils/cmd.go +++ b/utils/cmd.go @@ -100,18 +100,22 @@ func InitDataDir(Datadir string) { } } -func InitLogging(Datadir string, LogFile string, LogLevel int, DebugFile string) { +func InitLogging(Datadir string, LogFile string, LogLevel int, DebugFile string) ethlog.LogSystem { var writer io.Writer if LogFile == "" { writer = os.Stdout } else { writer = openLogFile(Datadir, LogFile) } - ethlog.AddLogSystem(ethlog.NewStdLogSystem(writer, log.LstdFlags, ethlog.LogLevel(LogLevel))) + + sys := ethlog.NewStdLogSystem(writer, log.LstdFlags, ethlog.LogLevel(LogLevel)) + ethlog.AddLogSystem(sys) if DebugFile != "" { writer = openLogFile(Datadir, DebugFile) ethlog.AddLogSystem(ethlog.NewStdLogSystem(writer, log.LstdFlags, ethlog.DebugLevel)) } + + return sys } func InitConfig(ConfigFile string, Datadir string, EnvPrefix string) *ethutil.ConfigManager { -- cgit v1.2.3