app_log

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetThreadLogger

func GetThreadLogger(threadID string, jobID int, title string, service string, level string) *zap.SugaredLogger

func NewLogger

func NewLogger(logLevel string) *zap.SugaredLogger

Types

type LoggerAdapter

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

func NewLoggerAdapter

func NewLoggerAdapter(logger *zap.SugaredLogger) *LoggerAdapter

func (*LoggerAdapter) Enabled

func (a *LoggerAdapter) Enabled(_ context.Context, level slog.Level) bool

func (*LoggerAdapter) Handle

func (a *LoggerAdapter) Handle(_ context.Context, record slog.Record) error

Handle logs the record using the adapted zap.SugaredLogger

func (*LoggerAdapter) WithAttrs

func (a *LoggerAdapter) WithAttrs(attrs []slog.Attr) slog.Handler

func (*LoggerAdapter) WithGroup

func (a *LoggerAdapter) WithGroup(name string) slog.Handler

Jump to

Keyboard shortcuts

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