diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 9222146207..69a417977e 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -272,8 +272,6 @@ func geth(ctx *cli.Context) error { return fmt.Errorf("invalid command: %q", args[0]) } - log2.InitOutputFile(ctx.String(utils.TimingOutputFlag.Name)) - node := makeFullNode(ctx) startNode(ctx, node) node.Wait() @@ -284,6 +282,9 @@ func geth(ctx *cli.Context) error { // it unlocks any requested accounts, and starts the RPC/IPC interfaces and the // miner. func startNode(ctx *cli.Context, stack *node.Node) { + //timing + log2.InitOutputFile(ctx.String(utils.TimingOutputFlag.Name)) + debug.Memsize.Add("node", stack) // Start up the node itself diff --git a/log2/logger.go b/log2/logger.go index 3d359bd382..bd01b7ff63 100644 --- a/log2/logger.go +++ b/log2/logger.go @@ -26,7 +26,6 @@ func InitOutputFile(outputFile string) { if err != nil { fmt.Fprintln(os.Stderr, "Fail to create log file for timing.") fmt.Fprintln(os.Stderr, err) - os.Exit(1) } }