aboutsummaryrefslogtreecommitdiff
path: root/llog/llog.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-06-30 18:07:41 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2023-06-30 18:09:47 +0200
commit8b29c4431d42f308f2f52d4c35129dae5d86a136 (patch)
tree708436f202a7685acf755baec22c29e68f554cdd /llog/llog.go
parent133494f37ae2f07d992bbb63b134aac4875c80c6 (diff)
downloadWRMS-8b29c4431d42f308f2f52d4c35129dae5d86a136.tar.gz
WRMS-8b29c4431d42f308f2f52d4c35129dae5d86a136.zip
print the stacktrace before calling log.Fatalln
Diffstat (limited to 'llog/llog.go')
-rw-r--r--llog/llog.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/llog/llog.go b/llog/llog.go
index 6f3aff9..1deecc8 100644
--- a/llog/llog.go
+++ b/llog/llog.go
@@ -3,6 +3,7 @@ package llog
import (
"fmt"
"log"
+ "runtime/debug"
)
type LogLevel int
@@ -53,6 +54,7 @@ func Log(l LogLevel, format string, a ...any) {
msg = fmt.Sprintf("[%s] %s", l.String(), msg)
if l == l_Fatal {
+ debug.PrintStack()
log.Fatalln(msg)
} else {
log.Println(msg)