logs

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultLogger

type DefaultLogger struct {
	*log.Logger
}

func (*DefaultLogger) LineWriter

func (l *DefaultLogger) LineWriter(prefix string) io.Writer

func (*DefaultLogger) Print

func (l *DefaultLogger) Print(v ...interface{})

func (*DefaultLogger) Printf

func (l *DefaultLogger) Printf(format string, v ...interface{})

func (*DefaultLogger) Write

func (l *DefaultLogger) Write(p []byte) (n int, err error)

type Logger

type Logger interface {
	io.Writer
	Print(v ...interface{})
	Printf(format string, v ...interface{})
	LineWriter(prefix string) io.Writer
}
var (
	Trace Logger = NewDiscard() //nolint:revive
	Debug Logger = NewDiscard() //nolint:revive
	Info  Logger = &DefaultLogger{log.New(os.Stderr, "INFO: ", log.Ldate|log.Ltime|log.Lshortfile)}
	Warn  Logger = &DefaultLogger{log.New(os.Stderr, "WARN: ", log.Ldate|log.Ltime|log.Lshortfile)}
)

func NewDebug

func NewDebug() Logger

func NewDiscard

func NewDiscard() Logger

func NewTrace

func NewTrace() Logger

Jump to

Keyboard shortcuts

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