logger

package
v0.0.0-...-9415ce5 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetEnableLevel

func SetEnableLevel(level zapcore.Level)

Types

type LogInfo

type LogInfo struct {
	LoggerRaw *zap.Logger
	Logger    *zap.SugaredLogger
	WX        *WriterX
}

func Init

func Init(path string, name string, enableConsoleLog bool) *LogInfo

type LogItem

type LogItem struct {
	Level  string  `json:"level"`
	TS     float64 `json:"ts"`
	Caller string  `json:"caller"`
	Msg    string  `json:"msg"`
}

type WriterX

type WriterX struct {
	LogLimit int64
	Items    []*LogItem
}

func (*WriterX) Write

func (w *WriterX) 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