console

package
v2.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormatText = internal.FormatText // Text format
	FormatJson = internal.FormatJson // JSON format
)
View Source
const Name = "console"

Name is the syncer name.

Variables

This section is empty.

Functions

This section is empty.

Types

type Format

type Format = internal.Format

Format is the log output format.

type Option

type Option func(o *options)

Option configures the syncer.

func WithFormat

func WithFormat(format Format) Option

WithFormat sets the output format.

type Syncer

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

Syncer is a console log syncer.

func NewSyncer

func NewSyncer(opts ...Option) *Syncer

NewSyncer returns a new console log syncer. The optional opts configure the syncer.

func (*Syncer) Close

func (s *Syncer) Close() error

Close closes the syncer.

func (*Syncer) Name

func (s *Syncer) Name() string

Name returns the syncer name.

func (*Syncer) Write

func (s *Syncer) Write(entity *internal.Entity) error

Write writes the given entity to the console. It returns any error encountered while writing.

Jump to

Keyboard shortcuts

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