From a8982f9ec47f8a0a80c7b3ad82470124b82b3ee4 Mon Sep 17 00:00:00 2001 From: Sad Pencil Date: Sat, 23 Feb 2019 06:35:23 +0800 Subject: [PATCH] t5 --- log2/logger.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/log2/logger.go b/log2/logger.go index 03cbe7eecc..18ad37fc4b 100644 --- a/log2/logger.go +++ b/log2/logger.go @@ -17,6 +17,9 @@ type TimingLog struct { } func InitOutputFile(outputFile string) { + if outputFile == "" { + log.Fatalln("You must specify the log file, e.g. \"geth --timing.output=/path/to/file.txt\"") + } var err error file, err = os.OpenFile(outputFile, os.O_APPEND|os.O_CREATE, 0644) if err != nil {