Documentation
¶
Index ¶
- Constants
- Variables
- func Debug(msg string, args ...any)
- func DebugContext(ctx context.Context, msg string, args ...any)
- func EnableConsole(logLevel slog.Level, logSource bool, logColour bool)
- func EnableLogFile(logLevel slog.Level, logSource bool, folder, filename string, ...)
- func EnableLogFile2(logLevel slog.Level, logSource bool, folder, filename string, ...)
- func Error(msg string, args ...any)
- func ErrorContext(ctx context.Context, msg string, args ...any)
- func Fatal(msg string, args ...any)
- func FatalContext(ctx context.Context, msg string, args ...any)
- func Info(msg string, args ...any)
- func InfoContext(ctx context.Context, msg string, args ...any)
- func Panic(msg string, args ...any)
- func PanicContext(ctx context.Context, msg string, args ...any)
- func Trace(msg string, args ...any)
- func TraceContext(ctx context.Context, msg string, args ...any)
- func Warn(msg string, args ...any)
- func WarnContext(ctx context.Context, msg string, args ...any)
Constants ¶
View Source
const ( LevelTrace = slog.LevelDebug - 4 LevelDebug = slog.LevelDebug LevelInfo = slog.LevelInfo LevelWarn = slog.LevelWarn LevelError = slog.LevelError LevelFatal = slog.LevelError + 4 LevelPanic = slog.LevelError + 8 )
Variables ¶
View Source
var (
Logger = slog.New(newHandler(os.Stdout, LevelDebug, false, true))
)
Functions ¶
func EnableLogFile ¶
func EnableLogFile2 ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.