Merge branch 'develop' of github.com:ethereum/go-ethereum into develop

This commit is contained in:
Maran 2014-05-23 10:29:17 +02:00
commit 36683f2e29
4 changed files with 10 additions and 3 deletions

View File

@ -4,6 +4,7 @@ import (
"flag" "flag"
) )
var Identifier string
var StartConsole bool var StartConsole bool
var StartMining bool var StartMining bool
var StartRpc bool var StartRpc bool
@ -21,6 +22,7 @@ var DataDir string
var AssetPath string var AssetPath string
func Init() { func Init() {
flag.StringVar(&Identifier, "i", "", "Custom client identifier")
flag.BoolVar(&StartConsole, "c", false, "debug and testing console") flag.BoolVar(&StartConsole, "c", false, "debug and testing console")
flag.BoolVar(&StartMining, "m", false, "start dagger mining") flag.BoolVar(&StartMining, "m", false, "start dagger mining")
flag.BoolVar(&StartRpc, "r", false, "start rpc server") flag.BoolVar(&StartRpc, "r", false, "start rpc server")

View File

@ -39,7 +39,7 @@ func main() {
runtime.GOMAXPROCS(runtime.NumCPU()) runtime.GOMAXPROCS(runtime.NumCPU())
ethchain.InitFees() ethchain.InitFees()
ethutil.ReadConfig(DataDir, ethutil.LogFile|ethutil.LogStd) ethutil.ReadConfig(DataDir, ethutil.LogFile|ethutil.LogStd, Identifier)
// Instantiated a eth stack // Instantiated a eth stack
ethereum, err := eth.New(eth.CapDefault, UseUPnP) ethereum, err := eth.New(eth.CapDefault, UseUPnP)

View File

@ -6,6 +6,7 @@ import (
"os" "os"
) )
var Identifier string
var StartMining bool var StartMining bool
var StartRpc bool var StartRpc bool
var RpcPort int var RpcPort int
@ -30,6 +31,7 @@ func Init() {
flag.PrintDefaults() flag.PrintDefaults()
} }
flag.StringVar(&Identifier, "i", "", "Custom client identifier")
flag.BoolVar(&StartMining, "m", false, "start dagger mining") flag.BoolVar(&StartMining, "m", false, "start dagger mining")
flag.BoolVar(&ShowGenesis, "g", false, "prints genesis header and exits") flag.BoolVar(&ShowGenesis, "g", false, "prints genesis header and exits")
flag.BoolVar(&StartRpc, "r", false, "start rpc server") flag.BoolVar(&StartRpc, "r", false, "start rpc server")

View File

@ -52,12 +52,15 @@ func main() {
var logSys *log.Logger var logSys *log.Logger
flags := log.LstdFlags flags := log.LstdFlags
var lt ethutil.LoggerType
if StartJsConsole || len(InputFile) > 0 { if StartJsConsole || len(InputFile) > 0 {
ethutil.ReadConfig(DataDir, ethutil.LogFile) lt = ethutil.LogFile
} else { } else {
ethutil.ReadConfig(DataDir, ethutil.LogFile|ethutil.LogStd) lt = ethutil.LogFile | ethutil.LogStd
} }
ethutil.ReadConfig(DataDir, lt, Identifier)
logger := ethutil.Config.Log logger := ethutil.Config.Log
if LogFile != "" { if LogFile != "" {