logger

package
v0.37.2 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New added in v0.9.0

func New(progress string, logOpts slog.HandlerOptions) slog.Handler

func NewPrettyLog added in v0.9.0

func NewPrettyLog(progress string, logOpts slog.HandlerOptions) slog.Handler

func NewRootLog added in v0.9.0

func NewRootLog(logOpts slog.HandlerOptions) slog.Handler

func NewSimpleLog added in v0.9.0

func NewSimpleLog(out io.Writer, level slog.Leveler) slog.Handler

Types

type AltScreen added in v0.31.3

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

func NewAlt added in v0.31.3

func NewAlt(out io.Writer) *AltScreen

func (*AltScreen) Enter added in v0.31.3

func (a *AltScreen) Enter()

func (*AltScreen) Exit added in v0.31.3

func (a *AltScreen) Exit()

func (*AltScreen) Render added in v0.31.3

func (a *AltScreen) Render(lines []string)

type BatchProcessor added in v0.18.0

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

BatchProcessor handles batched log message processing for better performance

type LogAggregator

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

LogAggregator manages log aggregation with memory optimization and concurrency

func GetLogAggregator

func GetLogAggregator() *LogAggregator

func NewLogAggregator

func NewLogAggregator(format string) *LogAggregator

NewLogAggregator returns the singleton instance of LogAggregator with memory optimization and concurrency

func (*LogAggregator) Copy added in v0.9.0

func (la *LogAggregator) Copy(r io.ReadCloser) (n int, err error)

func (*LogAggregator) FailedMessage

func (la *LogAggregator) FailedMessage(routineID string, msg string)

func (*LogAggregator) Flush

func (la *LogAggregator) Flush()

Flush will close the log channel and wait for all messages to be processed.

func (*LogAggregator) LogMessage

func (la *LogAggregator) LogMessage(routineID string, msg string)

func (*LogAggregator) SuccessMessage

func (la *LogAggregator) SuccessMessage(routineID string, msg string)

func (*LogAggregator) Write added in v0.9.0

func (la *LogAggregator) Write(p []byte) (n int, err error)

type LogEntry

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

LogEntry represents a single log entry with optimized memory usage and aligned fields

type LogMessage

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

LogMessage represents a single log message with optimized layout

type Options added in v0.9.0

type Options struct {
	Level slog.Leveler
}

type ResettableOnce

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

func (*ResettableOnce) Do

func (ro *ResettableOnce) Do(f func())

func (*ResettableOnce) Reset

func (ro *ResettableOnce) Reset()

type SimpleHandler added in v0.9.0

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

func (*SimpleHandler) Enabled added in v0.9.0

func (h *SimpleHandler) Enabled(ctx context.Context, level slog.Level) bool

func (*SimpleHandler) Handle added in v0.9.0

func (h *SimpleHandler) Handle(ctx context.Context, r slog.Record) error

func (*SimpleHandler) WithAttrs added in v0.9.0

func (h *SimpleHandler) WithAttrs(attrs []slog.Attr) slog.Handler

func (*SimpleHandler) WithGroup added in v0.9.0

func (h *SimpleHandler) WithGroup(name string) slog.Handler

Jump to

Keyboard shortcuts

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