logfmt

package
v0.0.0-...-cfdcfbe Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2025 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const TimeFormat = "2006/01/02 15:04:05"

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Printer
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(to io.Writer) *Handler

NewHandler returns a handler that prints the events to the supplied writer. Each event is printed in logfmt format on a single line.

func (*Handler) Event

func (h *Handler) Event(ctx context.Context, ev *event.Event) context.Context

type Printer

type Printer struct {
	QuoteValues       bool
	SuppressNamespace bool
	// contains filtered or unexported fields
}

func (*Printer) Event

func (p *Printer) Event(w io.Writer, ev *event.Event)

func (*Printer) Ident

func (p *Printer) Ident(w io.Writer, s string)

func (*Printer) Label

func (p *Printer) Label(w io.Writer, l event.Label)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳