Documentation ¶
Index ¶
- func Debug(v ...interface{})
- func Debugf(format string, params ...interface{})
- func Error(v ...interface{})
- func Errorf(format string, params ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(format string, params ...interface{})
- func Flush()
- func Info(v ...interface{})
- func Infof(format string, params ...interface{})
- func SetDefault(opts ...option)
- func Warn(v ...interface{})
- func Warnf(format string, params ...interface{})
- func WithCallerSkip(v int) option
- func WithColorful() option
- func WithContextHook(hook ContextHook) option
- func WithMinLevel(v string) option
- func WithName(v string) option
- func WithWriter(v io.Writer) option
- type ContextHook
- type Logger
- func (log *Logger) CallerSkip(skip int) *Logger
- func (log *Logger) Context(ctx context.Context) *Logger
- func (log *Logger) Debug(v ...interface{})
- func (log *Logger) Debugf(format string, params ...interface{})
- func (log *Logger) Error(v ...interface{})
- func (log *Logger) Errorf(format string, params ...interface{})
- func (log *Logger) Fatal(v ...interface{})
- func (log *Logger) Fatalf(format string, params ...interface{})
- func (log *Logger) Flush()
- func (log *Logger) Info(v ...interface{})
- func (log *Logger) Infof(format string, params ...interface{})
- func (log *Logger) Named(name string) *Logger
- func (log *Logger) Warn(v ...interface{})
- func (log *Logger) Warnf(format string, params ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithContextHook ¶ added in v1.5.0
func WithContextHook(hook ContextHook) option
WithContextHook .
Types ¶
type ContextHook ¶ added in v1.4.0
ContextHook return new Logger with context
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger .
func (*Logger) CallerSkip ¶ added in v1.3.0
CallerSkip 添加调用层
Click to show internal directories.
Click to hide internal directories.