Documentation
¶
Index ¶
- Constants
- func Debug(msg string, args ...any)
- func Error(msg string, args ...any)
- func GetSlog() *slog.Logger
- func Info(msg string, args ...any)
- func SentryFlush(d time.Duration)
- func Set(v *viper.Viper, opts ...Option) error
- func SetLevel(h, lv string) bool
- func Warn(msg string, args ...any)
- type Logger
- func (l *Logger) Debug(msg string, args ...any)
- func (l *Logger) Error(msg string, args ...any)
- func (l *Logger) GetSlog() *slog.Logger
- func (l *Logger) Info(msg string, args ...any)
- func (l *Logger) SetLevel(h, lv string) bool
- func (l *Logger) Warn(msg string, args ...any)
- func (l *Logger) With(args ...any) *Logger
- func (l *Logger) WithGroup(name string) *Logger
- type Option
Constants ¶
View Source
const ( HandlerText = "text" HandlerJSON = "json" HandlerSentry = "sentry" )
View Source
const ( OutputStdOut = "stdout" OutputFile = "file" )
View Source
const ( LevelDebug = "debug" LevelInfo = "info" LevelWarn = "warn" LevelError = "error" )
View Source
const (
RFC3339Micro = "2006-01-02T15:04:05.999999Z"
)
Variables ¶
This section is empty.
Functions ¶
func SentryFlush ¶ added in v0.2.7
Types ¶
type Option ¶ added in v0.2.3
type Option func(l *Logger)
func WithAddSource ¶ added in v0.2.5
func WithGitRev ¶ added in v0.2.3
func WithSkipLevel ¶ added in v0.2.5
func WithVersion ¶ added in v0.2.3
Click to show internal directories.
Click to hide internal directories.