formatters

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatForSeqIngestion

func FormatForSeqIngestion(events []*core.LogEvent) ([]byte, error)

FormatForSeqIngestion formats events for Seq's ingestion API

Types

type CLEFBatchFormatter

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

CLEFBatchFormatter formats multiple events for batch submission

func NewCLEFBatchFormatter

func NewCLEFBatchFormatter() *CLEFBatchFormatter

NewCLEFBatchFormatter creates a new batch formatter

func (*CLEFBatchFormatter) FormatBatch

func (f *CLEFBatchFormatter) FormatBatch(events []*core.LogEvent) ([]byte, error)

FormatBatch formats multiple events as newline-delimited JSON

type CLEFFormatter

type CLEFFormatter struct {
	// RenderMessage controls whether to render the message from the template
	RenderMessage bool
}

CLEFFormatter formats log events in Compact Log Event Format (CLEF) for Seq

func NewCLEFFormatter

func NewCLEFFormatter() *CLEFFormatter

NewCLEFFormatter creates a new CLEF formatter

func (*CLEFFormatter) Format

func (f *CLEFFormatter) Format(event *core.LogEvent) ([]byte, error)

Format formats a log event in CLEF format

type SeqIngestionFormat

type SeqIngestionFormat struct {
	Events []json.RawMessage `json:"events"`
}

SeqIngestionFormat represents the format for Seq's ingestion API

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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