package
Version:
v0.0.0-...-8da6f21
Opens a new window with list of versions in this module.
Published: Aug 29, 2023
License: GPL-3.0
Opens a new window with license information.
Imports: 12
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
config is an implementation of the Config interface.
New returns a new config struct.
Log is a wrapper around log.Logger.
NewLog returns a new Log using log.New.
func (l *Log) Debug(msg string, args ...interface{})
Debug logs a debug message.
func (l *Log) Error(msg string, args ...interface{})
Error logs an error message.
func (l *Log) Info(msg string, args ...interface{})
Info logs an info message.
func (l *Log) Warn(msg string, args ...interface{})
Warn logs a warning message.
type Logger interface {
Debug(string, ...interface{})
Info(string, ...interface{})
Warn(string, ...interface{})
Error(string, ...interface{})
}
Logger is an interface for logging.
Slog is a wrapper around slog.Logger.
NewSlog returns a new Slog using slog.NewJSONHandler.
func (srv *Slog) Debug(msg string, args ...interface{})
Debug logs a debug message.
func (srv *Slog) Error(msg string, args ...interface{})
Error logs an error message.
func (srv *Slog) Info(msg string, args ...interface{})
Info logs an info message.
func (srv *Slog) Warn(msg string, args ...interface{})
Warn logs a warning message.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.