consolecore

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

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

func New

func New(writer io.Writer, opts ...Option) *Core

func (*Core) Enabled

func (c *Core) Enabled(level core.Level) bool

func (*Core) Sync

func (c *Core) Sync() error

func (*Core) With

func (c *Core) With(fields []field.Field) core.Core

func (*Core) Write

func (c *Core) Write(event core.Event) error

type Encoder

type Encoder struct {
	TimeLayout string
}

func NewEncoder

func NewEncoder() *Encoder

func (*Encoder) Encode

func (e *Encoder) Encode(dst []byte, event core.Event) []byte

type Option

type Option func(*Core)

func WithClock

func WithClock(now func() time.Time) Option

func WithEncoder

func WithEncoder(encoder core.Encoder) Option

func WithFields

func WithFields(fields ...field.Field) Option

func WithLevel

func WithLevel(level core.Level) Option

func WithTimeLayout

func WithTimeLayout(layout string) Option

func WithWriter

func WithWriter(writer io.Writer) Option

Jump to

Keyboard shortcuts

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