add trace logging

This commit is contained in:
illustris
2026-03-12 19:39:35 +05:30
parent f15d0a90c8
commit ac2ac7a27c
11 changed files with 136 additions and 6 deletions

View File

@@ -0,0 +1,14 @@
package logging
import (
"context"
"log/slog"
)
// LevelTrace is a custom log level below Debug for very detailed diagnostic output.
const LevelTrace = slog.Level(-8)
// Trace logs a message at TRACE level using the default logger.
func Trace(msg string, args ...any) {
slog.Default().Log(context.Background(), LevelTrace, msg, args...)
}