logger

package
v0.0.0-...-c5e0fe0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opt Options) *logger

Returns a new logger. Caller is not responsible for closing files.

Types

type AppLogger

type AppLogger interface {
	Info(args ...interface{})
	Warn(args ...interface{})
	Error(args ...interface{})
	Fatal(args ...interface{})
}

type Options

type Options struct {
	Files  []io.Writer //It should implement Sync() error method.
	Stdout io.Writer   //It must be os.Stdout

}

Logger options. There will be no log when Output file nil and Silent is true

Jump to

Keyboard shortcuts

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