aboutsummaryrefslogtreecommitdiffstats
path: root/log/root.go
diff options
context:
space:
mode:
Diffstat (limited to 'log/root.go')
-rw-r--r--log/root.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/log/root.go b/log/root.go
index 39b4c9429..6814cc273 100644
--- a/log/root.go
+++ b/log/root.go
@@ -41,6 +41,11 @@ func Root() Logger {
// etc.) to keep the call depth the same for all paths to logger.write so
// runtime.Caller(2) always refers to the call site in client code.
+// Trace is a convenient alias for Root().Trace
+func Trace(msg string, ctx ...interface{}) {
+ root.write(msg, LvlTrace, ctx)
+}
+
// Debug is a convenient alias for Root().Debug
func Debug(msg string, ctx ...interface{}) {
root.write(msg, LvlDebug, ctx)
@@ -64,4 +69,5 @@ func Error(msg string, ctx ...interface{}) {
// Crit is a convenient alias for Root().Crit
func Crit(msg string, ctx ...interface{}) {
root.write(msg, LvlCrit, ctx)
+ os.Exit(1)
}