logger

package
v0.0.0-...-58fd0e2 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TEXT = "text"
	JSON = "json"
)
View Source
const (
	Debug = "debug"
	Info  = "info"
	Warn  = "warn"
	Error = "error"
	Fatal = "fatal"
)

Variables

This section is empty.

Functions

func NewCore

func NewCore(level, format, logPath, linkName string) (zapcore.Core, error)

func NewEncoder

func NewEncoder(format string) zapcore.Encoder

func NewLogger

func NewLogger(conf *koanf.Koanf) (*zap.SugaredLogger, error)

func NewTestLogger

func NewTestLogger() (*zap.SugaredLogger, error)

func NewWrite

func NewWrite(logPath string, linkName string) (zapcore.WriteSyncer, error)

Types

type ZapWriter

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

func NewZapWriter

func NewZapWriter(log *zap.SugaredLogger) *ZapWriter

func (ZapWriter) Write

func (z ZapWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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