Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LineBuffer ¶
type LineBuffer struct {
// contains filtered or unexported fields
}
LineBuffer is an io.WriteCloser that buffers data across writes and emits complete lines to the provided callback, preserving log entries that may span multiple writes. Any trailing partial line is flushed when Close is called.
func NewLineBuffer ¶
func NewLineBuffer(callback LogCallback) *LineBuffer
NewLineBuffer creates a new LineBuffer that calls the given callback for each complete line.
func (*LineBuffer) Close ¶
func (lp *LineBuffer) Close() error
Close flushes any buffered partial line.
type LogCallback ¶
type LogCallback func(line []byte)
LogCallback is the function signature for processing a complete log line.
type LogEntry ¶
type LogEntry interface {
LogLevel() slog.Level
LogMessage() string
LogFields() []any
FieldValue(key string) any
}
func ParseGoStructuredLogs ¶
func ParseRustStructuredLogs ¶
type StructuredGoLogEntry ¶
func (StructuredGoLogEntry) FieldValue ¶
func (e StructuredGoLogEntry) FieldValue(key string) any
func (StructuredGoLogEntry) LogFields ¶
func (e StructuredGoLogEntry) LogFields() []any
func (StructuredGoLogEntry) LogLevel ¶
func (e StructuredGoLogEntry) LogLevel() slog.Level
func (StructuredGoLogEntry) LogMessage ¶
func (e StructuredGoLogEntry) LogMessage() string
type StructuredRustLogEntry ¶
func (StructuredRustLogEntry) FieldValue ¶
func (e StructuredRustLogEntry) FieldValue(key string) any
func (StructuredRustLogEntry) LogFields ¶
func (e StructuredRustLogEntry) LogFields() []any
func (StructuredRustLogEntry) LogLevel ¶
func (e StructuredRustLogEntry) LogLevel() slog.Level
func (StructuredRustLogEntry) LogMessage ¶
func (e StructuredRustLogEntry) LogMessage() string
Click to show internal directories.
Click to hide internal directories.