From 1029e819f79ac95f6ed300259fcd13553ef0a834 Mon Sep 17 00:00:00 2001 From: Sad Pencil Date: Sat, 23 Feb 2019 06:44:32 +0800 Subject: [PATCH] t7 --- cmd/geth/main.go | 5 +++-- log2/logger.go | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) 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) } }