Documentation ¶
Index ¶
- Constants
- func CallerSource(skip int) *slog.Source
- func LoggerOptions(options ...Option) *loggerOptions
- func NewGoKitLogger(level string) gokitlog.Logger
- func NewGormLogger(level string) logger.Interface
- func NewLogger(w io.Writer, options ...Option) *slog.Logger
- func SourceContext(ctx context.Context, s *slog.Source) context.Context
- type ContextHandler
- type Option
Constants ¶
View Source
const ( LevelDebug string = "DEBUG" LevelInfo string = "INFO" LevelWarn string = "WARN" LevelError string = "ERROR" )
Variables ¶
This section is empty.
Functions ¶
func CallerSource ¶ added in v0.0.3
func LoggerOptions ¶
func LoggerOptions(options ...Option) *loggerOptions
func NewGoKitLogger ¶
logger.NewLogger(os.Stdout, logger.WithJSON(true)) logger := logger.NewGoKitLogger("info")
func NewGormLogger ¶ added in v0.0.3
logger.NewLogger(os.Stdout, logger.WithJSON(true)) logger := logger.NewGormLogger("info")
Types ¶
type ContextHandler ¶ added in v0.0.9
Click to show internal directories.
Click to hide internal directories.