file

package
v0.0.0-...-958ca12 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(writer WriteSyncer, encoder Formatter, min level.Level) log.Sink

Types

type Formatter

type Formatter interface {
	Format(buffer *bytes.Buffer, entry *log.Entry) error
}

type FormatterFunc

type FormatterFunc func(buffer *bytes.Buffer, entry *log.Entry) error

func (FormatterFunc) Format

func (fn FormatterFunc) Format(buffer *bytes.Buffer, entry *log.Entry) error

type JSONFormatter

type JSONFormatter struct {
}

func (JSONFormatter) Format

func (f JSONFormatter) Format(buffer *bytes.Buffer, entry *log.Entry) error

type Sink

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

func (*Sink) SetMinLevel

func (s *Sink) SetMinLevel(min level.Level)

func (*Sink) Sync

func (s *Sink) Sync()

func (*Sink) Write

func (s *Sink) Write(entry *log.Entry)

type TextFormatter

type TextFormatter struct {
}

func (TextFormatter) Format

func (f TextFormatter) Format(buffer *bytes.Buffer, entry *log.Entry) error

type WriteSyncer

type WriteSyncer interface {
	io.Writer

	Sync() error
}

Jump to

Keyboard shortcuts

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