Documentation ¶
Index ¶
- func Debugf(template string, args ...interface{})
- func ErrWrapper(err Err) error
- func Errorf(template string, args ...interface{})
- func Infof(template string, args ...interface{})
- func Warnf(template string, args ...interface{})
- type API
- type DummyLogger
- type Err
- type Level
- type Meta
- type OptionFunc
- func WithBuilder(builder func(*Meta) (API, error)) OptionFunc
- func WithCaller(Caller bool, CallerSkip int) OptionFunc
- func WithConsole(Console bool) OptionFunc
- func WithFileName(FileName string) OptionFunc
- func WithLevel(Level Level) OptionFunc
- func WithMaxAge(MaxAge int) OptionFunc
- func WithMaxBackups(MaxBackups int) OptionFunc
- func WithMaxSize(MaxSize int) OptionFunc
- type TerminalLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrWrapper ¶ added in v0.0.34
Types ¶
type API ¶ added in v0.0.34
type API interface { Debugf(template string, args ...interface{}) Infof(template string, args ...interface{}) Warnf(template string, args ...interface{}) Errorf(template string, args ...interface{}) }
func NewLogger ¶
func NewLogger(opts ...OptionFunc) (API, error)
type DummyLogger ¶ added in v0.0.11
type DummyLogger struct{}
func (DummyLogger) Debugf ¶ added in v0.0.46
func (DummyLogger) Debugf(string, ...interface{})
func (DummyLogger) Errorf ¶ added in v0.0.46
func (DummyLogger) Errorf(string, ...interface{})
func (DummyLogger) Infof ¶ added in v0.0.46
func (DummyLogger) Infof(string, ...interface{})
func (DummyLogger) Warnf ¶ added in v0.0.46
func (DummyLogger) Warnf(string, ...interface{})
type OptionFunc ¶ added in v0.0.46
type OptionFunc func(*Meta)
func WithBuilder ¶ added in v0.0.34
func WithBuilder(builder func(*Meta) (API, error)) OptionFunc
func WithCaller ¶ added in v0.0.44
func WithCaller(Caller bool, CallerSkip int) OptionFunc
func WithConsole ¶
func WithConsole(Console bool) OptionFunc
func WithFileName ¶
func WithFileName(FileName string) OptionFunc
func WithLevel ¶
func WithLevel(Level Level) OptionFunc
func WithMaxAge ¶
func WithMaxAge(MaxAge int) OptionFunc
func WithMaxBackups ¶
func WithMaxBackups(MaxBackups int) OptionFunc
func WithMaxSize ¶
func WithMaxSize(MaxSize int) OptionFunc
type TerminalLogger ¶ added in v0.0.46
type TerminalLogger struct{}
func (TerminalLogger) Debugf ¶ added in v0.0.46
func (t TerminalLogger) Debugf(template string, args ...interface{})
func (TerminalLogger) Errorf ¶ added in v0.0.46
func (t TerminalLogger) Errorf(template string, args ...interface{})
func (TerminalLogger) Infof ¶ added in v0.0.46
func (t TerminalLogger) Infof(template string, args ...interface{})
func (TerminalLogger) Warnf ¶ added in v0.0.46
func (t TerminalLogger) Warnf(template string, args ...interface{})
Click to show internal directories.
Click to hide internal directories.