logger

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 5 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultLogger

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

func NewDefaultLogger

func NewDefaultLogger() *DefaultLogger

func NewLogger

func NewLogger(out io.Writer, prefix string, flag int) *DefaultLogger

func (*DefaultLogger) Debug

func (l *DefaultLogger) Debug(args ...any)

func (*DefaultLogger) Debugf

func (l *DefaultLogger) Debugf(format string, v ...any)

func (*DefaultLogger) Error

func (l *DefaultLogger) Error(args ...any)

func (*DefaultLogger) Errorf

func (l *DefaultLogger) Errorf(format string, v ...any)

func (*DefaultLogger) Info

func (l *DefaultLogger) Info(args ...any)

func (*DefaultLogger) Warn

func (l *DefaultLogger) Warn(args ...any)

func (*DefaultLogger) Warnf

func (l *DefaultLogger) Warnf(format string, v ...any)

type FIface

type FIface interface {
	Errorf(format string, args ...any)
	Warnf(format string, args ...any)
	Debugf(format string, args ...any)
}

FIface 适用于 fmt.Errorf 风格的日志接口

type Iface

type Iface interface {
	Debug(args ...any)
	Info(args ...any)
	Warn(args ...any)
	Error(args ...any)
}

Iface 自定义logger接口,log及zap等均已实现此接口

Jump to

Keyboard shortcuts

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