Skip to content

Commit

Permalink
Adds critical, fatal, panic methods
Browse files Browse the repository at this point in the history
  • Loading branch information
apsdehal committed Sep 28, 2014
1 parent 64f529e commit c8a7c38
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions logger.go
Expand Up @@ -90,4 +90,18 @@ func (*l Logger) Log(lvl string, message string) {
format: formatString
}
l.worker.log(lvl, 2, info)
}

func (*l Logger) Fatal(message string) {
l.Log("CRITICAL", message)
os.Exit(1)
}

func (*l Logger) Panic(message string) {
l.Log("CRITICAL", message)
panic(message)
}

func (*l Logger) Critical(message string) {
l.Log("CRITICAL", message)
}

0 comments on commit c8a7c38

Please sign in to comment.