logx

package
v0.5.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug() *zerolog.Event

func Debugf

func Debugf(format string, v ...interface{})

func Err added in v0.4.2

func Err(err error) *zerolog.Event

func Error

func Error() *zerolog.Event

func Errorf

func Errorf(format string, v ...interface{})

func Fatal

func Fatal() *zerolog.Event

func Fatalf

func Fatalf(format string, v ...interface{})

func GinLogger added in v0.4.2

func GinLogger() gin.HandlerFunc

func Info

func Info() *zerolog.Event

func Infof

func Infof(format string, v ...interface{})

func Init

func Init(opfs ...func(opt *Option)) error

func KratosLogger added in v0.4.8

func KratosLogger() *loggerSt

func Logger

func Logger() *zerolog.Logger

func Panic

func Panic() *zerolog.Event

func Panicf

func Panicf(format string, v ...interface{})

func Sync

func Sync()

func Warn

func Warn() *zerolog.Event

func Warnf

func Warnf(format string, v ...interface{})

Types

type Option

type Option struct {
	Level       string // 日志等级
	LogPath     string // 日志路径
	Stdout      bool   // 是否输出到控制台
	Caller      bool   // 是否输出文件和行数
	Source      string // 来源
	MaxFileSize int    // 日志文件大小的最大值,单位(M)
	MaxBackups  int    // 最多保留备份数
	MaxAge      int    // 日志文件保存的时间,单位(天)
	Compress    bool   // 是否压缩
}

Jump to

Keyboard shortcuts

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