log

package
v2.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const LogboekLoggerCtxKeyName = "logboek_logger"

Variables

Functions

This section is empty.

Types

type BlockOptions

type BlockOptions struct {
	BlockTitle string
}

type Level

type Level string
const (
	SilentLevel  Level = "silent"
	ErrorLevel   Level = "error"
	WarningLevel Level = "warning"
	InfoLevel    Level = "info"
	DebugLevel   Level = "debug"
	TraceLevel   Level = "trace"

	LogColorModeAuto = "auto"
	LogColorModeOff  = "off"
	LogColorModeOn   = "on"
)

type LogboekLogger

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

func NewLogboekLogger

func NewLogboekLogger() *LogboekLogger

func (*LogboekLogger) AcceptLevel

func (l *LogboekLogger) AcceptLevel(ctx context.Context, lvl Level) bool

func (*LogboekLogger) BlockContentWidth

func (l *LogboekLogger) BlockContentWidth(ctx context.Context) int

func (*LogboekLogger) Debug

func (l *LogboekLogger) Debug(ctx context.Context, format string, a ...interface{})

func (*LogboekLogger) DebugPop

func (l *LogboekLogger) DebugPop(ctx context.Context, group string)

func (*LogboekLogger) DebugPush

func (l *LogboekLogger) DebugPush(ctx context.Context, group, format string, a ...interface{})

func (*LogboekLogger) Error

func (l *LogboekLogger) Error(ctx context.Context, format string, a ...interface{})

func (*LogboekLogger) ErrorPop

func (l *LogboekLogger) ErrorPop(ctx context.Context, group string)

func (*LogboekLogger) ErrorPush

func (l *LogboekLogger) ErrorPush(ctx context.Context, group, format string, a ...interface{})

func (*LogboekLogger) Info

func (l *LogboekLogger) Info(ctx context.Context, format string, a ...interface{})

func (*LogboekLogger) InfoBlock

func (l *LogboekLogger) InfoBlock(ctx context.Context, opts BlockOptions, fn func())

func (*LogboekLogger) InfoBlockErr

func (l *LogboekLogger) InfoBlockErr(ctx context.Context, opts BlockOptions, fn func() error) error

func (*LogboekLogger) InfoPop

func (l *LogboekLogger) InfoPop(ctx context.Context, group string)

func (*LogboekLogger) InfoPush

func (l *LogboekLogger) InfoPush(ctx context.Context, group, format string, a ...interface{})

func (*LogboekLogger) Level

func (l *LogboekLogger) Level(ctx context.Context) Level

func (*LogboekLogger) SetLevel

func (l *LogboekLogger) SetLevel(ctx context.Context, lvl Level)

func (*LogboekLogger) Trace

func (l *LogboekLogger) Trace(ctx context.Context, format string, a ...interface{})

func (*LogboekLogger) TracePop

func (l *LogboekLogger) TracePop(ctx context.Context, group string)

func (*LogboekLogger) TracePush

func (l *LogboekLogger) TracePush(ctx context.Context, group, format string, a ...interface{})

func (*LogboekLogger) TraceStruct

func (l *LogboekLogger) TraceStruct(ctx context.Context, obj interface{}, format string, a ...interface{})

func (*LogboekLogger) Warn

func (l *LogboekLogger) Warn(ctx context.Context, format string, a ...interface{})

func (*LogboekLogger) WarnPop

func (l *LogboekLogger) WarnPop(ctx context.Context, group string)

func (*LogboekLogger) WarnPush

func (l *LogboekLogger) WarnPush(ctx context.Context, group, format string, a ...interface{})

type Logger

type Logger interface {
	Trace(ctx context.Context, format string, a ...interface{})
	TraceStruct(ctx context.Context, obj interface{}, format string, a ...interface{})
	TracePush(ctx context.Context, group, format string, a ...interface{})
	TracePop(ctx context.Context, group string)
	Debug(ctx context.Context, format string, a ...interface{})
	DebugPush(ctx context.Context, group, format string, a ...interface{})
	DebugPop(ctx context.Context, group string)
	Info(ctx context.Context, format string, a ...interface{})
	InfoPush(ctx context.Context, group, format string, a ...interface{})
	InfoPop(ctx context.Context, group string)
	Warn(ctx context.Context, format string, a ...interface{})
	WarnPush(ctx context.Context, group, format string, a ...interface{})
	WarnPop(ctx context.Context, group string)
	Error(ctx context.Context, format string, a ...interface{})
	ErrorPush(ctx context.Context, group, format string, a ...interface{})
	ErrorPop(ctx context.Context, group string)
	InfoBlock(ctx context.Context, opts BlockOptions, fn func())
	InfoBlockErr(ctx context.Context, opts BlockOptions, fn func() error) error
	BlockContentWidth(ctx context.Context) int
	SetLevel(ctx context.Context, lvl Level)
	Level(ctx context.Context) Level
	AcceptLevel(ctx context.Context, lvl Level) bool
}
var Default Logger = NewLogboekLogger()

type RestyLogger

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

func NewRestyLogger

func NewRestyLogger(ctx context.Context) *RestyLogger

func (RestyLogger) Debugf

func (l RestyLogger) Debugf(format string, v ...interface{})

func (RestyLogger) Errorf

func (l RestyLogger) Errorf(format string, v ...interface{})

func (RestyLogger) Infof

func (l RestyLogger) Infof(format string, v ...interface{})

func (RestyLogger) Warnf

func (l RestyLogger) Warnf(format string, v ...interface{})

Jump to

Keyboard shortcuts

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