stdoutlogs

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

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

Exporter is an implementation of logs.LogRecordSyncer that writes spans to stdout.

func NewExporter

func NewExporter(options ...Option) (*Exporter, error)

NewExporter creates an Exporter with the passed options.

func (*Exporter) Export

func (e *Exporter) Export(ctx context.Context, logs []sdk.ReadableLogRecord) error

Export writes logs in json format to stdout.

func (*Exporter) MarshalLog

func (e *Exporter) MarshalLog() interface{}

MarshalLog is the marshaling function used by the logging system to represent this exporter.

func (*Exporter) Shutdown

func (e *Exporter) Shutdown(ctx context.Context) error

Shutdown is called to stop the exporter, it performs no action.

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option sets the value of an option for a Config.

func WithPrettyPrint added in v0.2.2

func WithPrettyPrint() Option

WithPrettyPrint sets the export stream format to use JSON.

func WithWriter

func WithWriter(w io.Writer) Option

WithWriter sets the export stream destination.

Jump to

Keyboard shortcuts

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