diff options
author | obscuren <geffobscura@gmail.com> | 2014-05-05 21:55:43 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-05-05 21:55:43 +0800 |
commit | 2096b3a9edb3289a8f30da81704181dec7b39917 (patch) | |
tree | 1a38e845f32ecfc94a73546ec4cfdb971b740830 /ethutil/config.go | |
parent | 6a86c517c4f4b372cad0ae1d92e926a482eac5ba (diff) | |
parent | fedd4c906ff9f6139cb2d88e4f1adefbf6ea81a6 (diff) | |
download | go-tangerine-2096b3a9edb3289a8f30da81704181dec7b39917.tar go-tangerine-2096b3a9edb3289a8f30da81704181dec7b39917.tar.gz go-tangerine-2096b3a9edb3289a8f30da81704181dec7b39917.tar.bz2 go-tangerine-2096b3a9edb3289a8f30da81704181dec7b39917.tar.lz go-tangerine-2096b3a9edb3289a8f30da81704181dec7b39917.tar.xz go-tangerine-2096b3a9edb3289a8f30da81704181dec7b39917.tar.zst go-tangerine-2096b3a9edb3289a8f30da81704181dec7b39917.zip |
Merge branch 'release/poc5-rc1'
Diffstat (limited to 'ethutil/config.go')
-rw-r--r-- | ethutil/config.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ethutil/config.go b/ethutil/config.go index 54b066fb9..382396ceb 100644 --- a/ethutil/config.go +++ b/ethutil/config.go @@ -9,6 +9,7 @@ import ( "runtime" ) +// Log types available type LogType byte const ( @@ -16,7 +17,7 @@ const ( LogTypeFile = 2 ) -// Config struct isn't exposed +// Config struct type config struct { Db Database @@ -31,7 +32,9 @@ type config struct { var Config *config -// Read config doesn't read anything yet. +// Read config +// +// Initialize the global Config variable with default settings func ReadConfig(base string) *config { if Config == nil { usr, _ := user.Current() @@ -48,7 +51,7 @@ func ReadConfig(base string) *config { } } - Config = &config{ExecPath: path, Debug: true, Ver: "0.3.1"} + Config = &config{ExecPath: path, Debug: true, Ver: "0.5 RC1"} Config.Log = NewLogger(LogFile|LogStd, LogLevelDebug) Config.SetClientString("/Ethereum(G)") } @@ -56,6 +59,8 @@ func ReadConfig(base string) *config { return Config } +// Set client string +// func (c *config) SetClientString(str string) { Config.ClientString = fmt.Sprintf("%s nv%s/%s", str, c.Ver, runtime.GOOS) } @@ -134,7 +139,7 @@ func (log *Logger) Infoln(v ...interface{}) { return } - fmt.Println(len(log.logSys)) + //fmt.Println(len(log.logSys)) for _, logger := range log.logSys { logger.Println(v...) } |