Versions in this module Expand all Collapse all v1 v1.0.2 Oct 14, 2024 v1.0.1 Sep 29, 2024 Changes in this version + func Debug(args ...interface{}) + func Debugf(template string, args ...interface{}) + func Error(args ...interface{}) + func Errorf(template string, args ...interface{}) + func Fatal(args ...interface{}) + func Fatalf(template string, args ...interface{}) + func Info(args ...interface{}) + func Infof(template string, args ...interface{}) + func Init(opts ...Option) error + func Log(level Level, v ...interface{}) + func Logf(level Level, format string, v ...interface{}) + func NewContext(ctx context.Context, l *Helper) context.Context + func String() string + func Trace(args ...interface{}) + func Tracef(template string, args ...interface{}) + func V(lvl Level, log Logger) bool + func Warn(args ...interface{}) + func Warnf(template string, args ...interface{}) + type Helper struct + func FromContext(ctx context.Context) (*Helper, bool) + func NewHelper(log Logger) *Helper + func (h *Helper) Debug(args ...interface{}) + func (h *Helper) Debugf(template string, args ...interface{}) + func (h *Helper) Error(args ...interface{}) + func (h *Helper) Errorf(template string, args ...interface{}) + func (h *Helper) Fatal(args ...interface{}) + func (h *Helper) Fatalf(template string, args ...interface{}) + func (h *Helper) Info(args ...interface{}) + func (h *Helper) Infof(template string, args ...interface{}) + func (h *Helper) Trace(args ...interface{}) + func (h *Helper) Tracef(template string, args ...interface{}) + func (h *Helper) Warn(args ...interface{}) + func (h *Helper) Warnf(template string, args ...interface{}) + func (h *Helper) WithError(err error) *Helper + func (h *Helper) WithFields(fields map[string]interface{}) *Helper + type Level int8 + const DebugLevel + const ErrorLevel + const FatalLevel + const InfoLevel + const TraceLevel + const WarnLevel + func GetLevel(levelStr string) (Level, error) + func (l Level) Enabled(lvl Level) bool + func (l Level) LevelForGorm() int + func (l Level) String() string + type Logger interface + Fields func(fields map[string]interface{}) Logger + Init func(options ...Option) error + Log func(level Level, v ...interface{}) + Logf func(level Level, format string, v ...interface{}) + Options func() Options + String func() string + var DefaultLogger Logger + func Fields(fields map[string]interface{}) Logger + func NewLogger(opts ...Option) Logger + type Option func(*Options) + func SetOption(k, v interface{}) Option + func WithCallerSkipCount(c int) Option + func WithFields(fields map[string]interface{}) Option + func WithLevel(level Level) Option + func WithName(name string) Option + func WithOutput(out io.Writer) Option + type Options struct + CallerSkipCount int + Context context.Context + Fields map[string]interface{} + Level Level + Name string + Out io.Writer