logger

package
v0.1.30 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetTraceID

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

Types

type Config

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

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