diff options
author | obscuren <geffobscura@gmail.com> | 2014-08-22 18:40:15 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-08-22 18:40:15 +0800 |
commit | 5ac875b097a55c75a7e3da3443ef9fe64fc87846 (patch) | |
tree | 3d3289d2b6fc50dc00d9c4838a7ddf9ee2574fb2 /utils | |
parent | 842f2cc8a06627a1de4fbdd1580fefe14be85a04 (diff) | |
download | dexon-5ac875b097a55c75a7e3da3443ef9fe64fc87846.tar dexon-5ac875b097a55c75a7e3da3443ef9fe64fc87846.tar.gz dexon-5ac875b097a55c75a7e3da3443ef9fe64fc87846.tar.bz2 dexon-5ac875b097a55c75a7e3da3443ef9fe64fc87846.tar.lz dexon-5ac875b097a55c75a7e3da3443ef9fe64fc87846.tar.xz dexon-5ac875b097a55c75a7e3da3443ef9fe64fc87846.tar.zst dexon-5ac875b097a55c75a7e3da3443ef9fe64fc87846.zip |
Set log level of std logger as well. (since gui logging is disabled)
Diffstat (limited to 'utils')
-rw-r--r-- | utils/cmd.go | 8 |
1 files changed, 6 insertions, 2 deletions
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 { |