Documentation
¶
Overview ¶
Package trace contains tracing utilities such as the logger.
Index ¶
- Constants
- type HLogger
- func (l *HLogger) Debug(mod, msg string, args ...any)
- func (l *HLogger) Error(mod, msg string, err error, args ...any)
- func (l *HLogger) Info(mod, msg string, args ...any)
- func (l *HLogger) Log(level slog.Level, mod string, msg string, args ...any)
- func (l *HLogger) Warn(mod, msg string, args ...any)
- type Logger
- type TestLogger
Constants ¶
View Source
const LogPkgKey = "module"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HLogger ¶
type HLogger struct {
// contains filtered or unexported fields
}
HLogger is the system's default logger.
type Logger ¶
type Logger interface { Debug(mod, msg string, args ...any) Info(mod, msg string, args ...any) Warn(mod, msg string, args ...any) Error(mod, msg string, err error, args ...any) }
func NewLogger ¶
func NewLogger() Logger
NewLogger creates a new standard logger that writes to stdout.
func NewTestLogger ¶
type TestLogger ¶
type TestLogger struct {
// contains filtered or unexported fields
}
TestLogger is a logger that writes to the test's log.
func (*TestLogger) Debug ¶
func (l *TestLogger) Debug(mod, msg string, args ...any)
func (*TestLogger) Info ¶
func (l *TestLogger) Info(mod, msg string, args ...any)
func (*TestLogger) Warn ¶
func (l *TestLogger) Warn(mod, msg string, args ...any)
Click to show internal directories.
Click to hide internal directories.