logger

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

type Writer interface {
	// Init do some necessary setup before calling WriteInf & WriteErr, Ideally
	// this only called once.
	Init()
	// Inf write message for info-level log
	Inf(...any)
	// Err write message for error-level log
	Err(...any)
}

Writer interface to write log message.

func NewFile

func NewFile(wr io.Writer) Writer

NewFile return logger that write message to given io.Writer.

func NewStdOut

func NewStdOut() Writer

NewStdOut return logger that write message to os.Stdout.

Jump to

Keyboard shortcuts

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