output

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuiltInToken added in v0.6.0

type BuiltInToken struct {
	Name   string
	Format string
}

BuiltInToken represents a built-in template element like ${Message}

func (*BuiltInToken) Render added in v0.6.0

func (t *BuiltInToken) Render(event *core.LogEvent) string

type PropertyToken

type PropertyToken struct {
	PropertyName string
	Format       string
}

PropertyToken represents a property reference with optional format

func (*PropertyToken) Render

func (t *PropertyToken) Render(event *core.LogEvent) string

type Template

type Template struct {
	Raw    string
	Tokens []Token
}

Template represents a parsed output template

func Parse

func Parse(template string) (*Template, error)

Parse parses an output template string

func (*Template) Render

func (t *Template) Render(event *core.LogEvent) string

Render renders the template with the given event

type TextToken

type TextToken struct {
	Text string
}

TextToken represents literal text in the template

func (*TextToken) Render

func (t *TextToken) Render(event *core.LogEvent) string

type Token

type Token interface {
	Render(event *core.LogEvent) string
}

Token represents a token in an output template

Jump to

Keyboard shortcuts

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