simple

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(w *Writer)

Option for the simple Writer

func Level

func Level(lvl logging.Level) Option

Level will apply the logging level to the writer for output verbosity

type Writer

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

Writer is a simple logging.Writer implementation

func New

func New(w io.Writer, opts ...Option) *Writer

New creates a new Writer to output the specified io.Writer with the provided Options

This is a super simple implementation (hence the name) that will output in the following format: > [<timestamp>] <level> <message> <field.Key=field.Value>...

func (*Writer) Write

func (w *Writer) Write(e logging.Entry)

Jump to

Keyboard shortcuts

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