aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-19 23:02:16 +0800
committerobscuren <geffobscura@gmail.com>2014-05-19 23:02:16 +0800
commita2fb265563a3a6eb80efc5720bb0c6f3fec6f397 (patch)
tree5b1696ce0893193d565cf0fc0268849a5c7def22 /ethutil
parentb8034f4d9ed7eea29a219a2d894ae22041a906a7 (diff)
downloadgo-tangerine-a2fb265563a3a6eb80efc5720bb0c6f3fec6f397.tar.gz
go-tangerine-a2fb265563a3a6eb80efc5720bb0c6f3fec6f397.tar.zst
go-tangerine-a2fb265563a3a6eb80efc5720bb0c6f3fec6f397.zip
Added a fatal method
Diffstat (limited to 'ethutil')
-rw-r--r--ethutil/config.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/ethutil/config.go b/ethutil/config.go
index 296b72d9e..fd590fbdb 100644
--- a/ethutil/config.go
+++ b/ethutil/config.go
@@ -130,7 +130,6 @@ func (log *Logger) Infoln(v ...interface{}) {
return
}
- //fmt.Println(len(log.logSys))
for _, logger := range log.logSys {
logger.Println(v...)
}
@@ -145,3 +144,15 @@ func (log *Logger) Infof(format string, v ...interface{}) {
logger.Printf(format, v...)
}
}
+
+func (log *Logger) Fatal(v ...interface{}) {
+ if log.logLevel > LogLevelInfo {
+ return
+ }
+
+ for _, logger := range log.logSys {
+ logger.Println(v...)
+ }
+
+ os.Exit(1)
+}