add trace logging
This commit is contained in:
14
src/internal/logging/logging.go
Normal file
14
src/internal/logging/logging.go
Normal 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...)
|
||||
}
|
||||
Reference in New Issue
Block a user