log

package
v1.2.9-beta4 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebugLevel = "debug" // default level
	InfoLevel  = "info"
	WarnLevel  = "warn"
	ErrorLevel = "error"
	InConsole  = "console"
	InFile     = "file"
	InAll      = "all"
)

Variables

View Source
var FileRotatelogs = new(fileRotatelogs)
View Source
var Zap = new(_zap)

Functions

func Debug added in v1.2.7

func Debug(args ...any)

func Error

func Error(args ...any)

func Info

func Info(args ...any)

func InitProfile added in v1.2.7

func InitProfile()

InitProfile init log conf replace default if you only use log print, not call this func

func Warn

func Warn(args ...any)

Types

type Log

type Log struct {
	*zap.SugaredLogger
	LogWriter
}

Log log

func GetLog added in v1.2.1

func GetLog() *Log

GetLog get once log, only as log maybe use InitProfile to init some param

func NewLog

func NewLog() *Log

NewLog new log

type LogWriter

type LogWriter interface {
	Println(v ...any)
}

LogWriter log writer interface

Jump to

Keyboard shortcuts

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