logger

package
v0.7.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetTraceID added in v0.7.11

func SetTraceID(ctx context.Context, traceID any) context.Context

Types

type Config added in v0.7.0

type Config struct {
	Skip    int
	AppName string

	// Log file config.
	Path       string
	MaxSize    int // megabytes
	MaxAge     int // days
	MaxBackups int
	Compress   bool
}

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func New

func New(c Config) (*Logger, error)

func (*Logger) Debug

func (l *Logger) Debug(args ...any)

func (*Logger) Debugf

func (l *Logger) Debugf(template string, args ...any)

func (*Logger) Error

func (l *Logger) Error(args ...any)

func (*Logger) Errorf

func (l *Logger) Errorf(template string, args ...any)

func (*Logger) Fatal

func (l *Logger) Fatal(args ...any)

func (*Logger) Fatalf

func (l *Logger) Fatalf(template string, args ...any)

func (*Logger) Info

func (l *Logger) Info(args ...any)

func (*Logger) Infof

func (l *Logger) Infof(template string, args ...any)

func (*Logger) Panic

func (l *Logger) Panic(args ...any)

func (*Logger) Panicf

func (l *Logger) Panicf(template string, args ...any)

func (*Logger) Warn

func (l *Logger) Warn(args ...any)

func (*Logger) Warnf

func (l *Logger) Warnf(template string, args ...any)

func (*Logger) WithCtx added in v0.7.0

func (l *Logger) WithCtx(ctx context.Context) *Logger

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL