batch

package
v3.21.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = New(os.Stdout)

Default handler outputting to stdout. We want to emit the batch output on the standard output, for two reasons:

1. because third party libraries MAY log on the stderr and their logs are most likely not JSON;

2. because this enables piping to `jq` or other tools in a much more natural way than when emitting on stderr.

See https://github.com/ooni/probe/issues/1384.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	*j.Encoder
	// contains filtered or unexported fields
}

Handler implementation.

func New

func New(w io.Writer) *Handler

New handler.

func (*Handler) HandleLog

func (h *Handler) HandleLog(e *log.Entry) error

HandleLog implements log.Handler.

Jump to

Keyboard shortcuts

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