logger

package
v0.13.25-1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: Apache-2.0 Imports: 14 Imported by: 17

Documentation

Index

Constants

View Source
const (
	DEFAULT_FILE = "log.log"
)

Variables

This section is empty.

Functions

func Default added in v0.12.12

func Default() *logger

func Error

func Error(args ...any)

func ErrorContext added in v0.12.12

func ErrorContext(ctx context.Context, args ...any)

func Errorf

func Errorf(template string, args ...any)

func ErrorfContext added in v0.12.12

func ErrorfContext(ctx context.Context, template string, args ...any)

func Fatal

func Fatal(args ...any)

func FatalContext added in v0.12.12

func FatalContext(ctx context.Context, args ...any)

func GetLogStr

func GetLogStr(needLog string) string

func GetMessage added in v0.7.0

func GetMessage(template string, fmtArgs []any) string

getMessage format with Sprint, Sprintf, or neither.

func Info

func Info(args ...any)

func InfoContext added in v0.12.12

func InfoContext(ctx context.Context, args ...any)

func Infof

func Infof(template string, args ...any)

func InfofContext added in v0.12.12

func InfofContext(ctx context.Context, template string, args ...any)

func InitLog

func InitLog(fileDir string, serviceName string, port string, console bool, json bool, maxAgeDay uint64)

func NewLogInstance added in v0.6.10

func NewLogInstance(fileDir string, serviceName string, port string, console bool, json bool, maxAgeDay uint64) *slog.Logger

func Panic

func Panic(args ...any)

func PanicContext added in v0.12.12

func PanicContext(ctx context.Context, args ...any)

func Sync

func Sync()

func Warn

func Warn(args ...any)

func WarnContext added in v0.12.12

func WarnContext(ctx context.Context, args ...any)

func Warnf

func Warnf(template string, args ...any)

func WarnfContext added in v0.12.12

func WarnfContext(ctx context.Context, template string, args ...any)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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