Documentation ¶
Index ¶
Constants ¶
View Source
const ( LevelTrace = slog.Level(-8) LevelSuccess = slog.Level(6) )
Variables ¶
View Source
var LevelNames = map[slog.Leveler]string{ LevelTrace: "TRACE", LevelSuccess: "SUCCESS", }
Functions ¶
func PrintMessage ¶
func PrintMessage[T LogMessageType](key string, value T) any
Types ¶
type CustomLogger ¶
type CustomLogger struct {
// contains filtered or unexported fields
}
func NewLogger ¶
func NewLogger(options OptionsLogger) *CustomLogger
func (*CustomLogger) Debug ¶
func (c *CustomLogger) Debug(msg string, args ...any)
func (*CustomLogger) Error ¶
func (c *CustomLogger) Error(msg string, args ...any)
func (*CustomLogger) Info ¶
func (c *CustomLogger) Info(msg string, args ...any)
func (*CustomLogger) Success ¶
func (c *CustomLogger) Success(msg string, args ...any)
func (*CustomLogger) Warning ¶
func (c *CustomLogger) Warning(msg string, args ...any)
type OptionsLogger ¶
type PrettyHandler ¶
type PrettyHandlerOptions ¶
type PrettyHandlerOptions struct {
SlogOpts slog.HandlerOptions
}
Click to show internal directories.
Click to hide internal directories.