Documentation ¶
Index ¶
- func MustGet[T any](value T, err error) func(l Logger) T
- type Fmt
- func (l *Fmt) Debug(a ...interface{})
- func (l *Fmt) Debugf(format string, a ...interface{})
- func (l *Fmt) Error(a ...interface{})
- func (l *Fmt) Errorf(format string, a ...interface{})
- func (l *Fmt) Fatal(a ...interface{})
- func (l *Fmt) Fatalf(format string, a ...interface{})
- func (l *Fmt) Info(a ...interface{})
- func (l *Fmt) Infof(format string, a ...interface{})
- func (l *Fmt) IsLevel(v Level) bool
- func (l *Fmt) Level() Level
- func (l *Fmt) Must(err error)
- func (l *Fmt) Named(name string) Logger
- func (l *Fmt) Print(a ...interface{})
- func (l *Fmt) Printf(format string, a ...interface{})
- func (l *Fmt) SlogHandler() slog.Handler
- func (l *Fmt) Success(a ...interface{})
- func (l *Fmt) Successf(format string, a ...interface{})
- func (l *Fmt) Trace(a ...interface{})
- func (l *Fmt) Tracef(format string, a ...interface{})
- func (l *Fmt) Warn(a ...interface{})
- func (l *Fmt) Warnf(format string, a ...interface{})
- type FmtOption
- type Level
- type Logger
- type PTerm
- func (l *PTerm) Debug(a ...interface{})
- func (l *PTerm) Debugf(format string, a ...interface{})
- func (l *PTerm) Error(a ...interface{})
- func (l *PTerm) Errorf(format string, a ...interface{})
- func (l *PTerm) Fatal(a ...interface{})
- func (l *PTerm) Fatalf(format string, a ...interface{})
- func (l *PTerm) Info(a ...interface{})
- func (l *PTerm) Infof(format string, a ...interface{})
- func (l *PTerm) IsLevel(v Level) bool
- func (l *PTerm) Level() Level
- func (l *PTerm) Must(err error)
- func (l *PTerm) Named(name string) Logger
- func (l *PTerm) Print(a ...interface{})
- func (l *PTerm) Printf(format string, a ...interface{})
- func (l *PTerm) SlogHandler() slog.Handler
- func (l *PTerm) Success(a ...interface{})
- func (l *PTerm) Successf(format string, a ...interface{})
- func (l *PTerm) Trace(a ...interface{})
- func (l *PTerm) Tracef(format string, a ...interface{})
- func (l *PTerm) Warn(a ...interface{})
- func (l *PTerm) Warnf(format string, a ...interface{})
- type PTermOption
- type Test
- func (l *Test) Debug(a ...interface{})
- func (l *Test) Debugf(format string, a ...interface{})
- func (l *Test) Error(a ...interface{})
- func (l *Test) Errorf(format string, a ...interface{})
- func (l *Test) Fatal(a ...interface{})
- func (l *Test) Fatalf(format string, a ...interface{})
- func (l *Test) Info(a ...interface{})
- func (l *Test) Infof(format string, a ...interface{})
- func (l *Test) IsLevel(v Level) bool
- func (l *Test) Level() Level
- func (l *Test) Must(err error)
- func (l *Test) Named(name string) Logger
- func (l *Test) Print(a ...interface{})
- func (l *Test) Printf(format string, a ...interface{})
- func (l *Test) SlogHandler() slog.Handler
- func (l *Test) Success(a ...interface{})
- func (l *Test) Successf(format string, a ...interface{})
- func (l *Test) Trace(a ...interface{})
- func (l *Test) Tracef(format string, a ...interface{})
- func (l *Test) Warn(a ...interface{})
- func (l *Test) Warnf(format string, a ...interface{})
- type TestOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fmt ¶
type Fmt struct {
// contains filtered or unexported fields
}
func (*Fmt) SlogHandler ¶ added in v0.7.0
type Logger ¶
type Logger interface { Level() Level IsLevel(level Level) bool Named(name string) Logger Print(a ...interface{}) Printf(format string, a ...interface{}) Success(a ...interface{}) Successf(format string, a ...interface{}) Trace(a ...interface{}) Tracef(format string, a ...interface{}) Debug(a ...interface{}) Debugf(format string, a ...interface{}) Info(a ...interface{}) Infof(format string, a ...interface{}) Warn(a ...interface{}) Warnf(format string, a ...interface{}) Error(a ...interface{}) Errorf(format string, a ...interface{}) Fatal(a ...interface{}) Fatalf(format string, a ...interface{}) Must(err error) SlogHandler() slog.Handler }
type PTerm ¶
type PTerm struct {
// contains filtered or unexported fields
}
func NewPTerm ¶
func NewPTerm(opts ...PTermOption) *PTerm
func (*PTerm) SlogHandler ¶ added in v0.7.0
type PTermOption ¶
type PTermOption func(*PTerm)
func PTermWithDisableColor ¶
func PTermWithDisableColor(v bool) PTermOption
func PTermWithLevel ¶
func PTermWithLevel(v Level) PTermOption
type Test ¶ added in v0.3.0
type Test struct {
// contains filtered or unexported fields
}
func (*Test) SlogHandler ¶ added in v0.7.0
type TestOption ¶ added in v0.3.0
type TestOption func(*Test)
func TestWithLevel ¶ added in v0.3.0
func TestWithLevel(v Level) TestOption
Click to show internal directories.
Click to hide internal directories.