log

package
v0.0.0-...-4fcc479 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Logger                 *zap.SugaredLogger
	AccessLogger           *zap.SugaredLogger
	MetricLogger           *zap.SugaredLogger
	TraceLogger            *zap.SugaredLogger
	DatabaseLogger         *zap.SugaredLogger
	WorkflowLogger         *zap.SugaredLogger
	WorkflowDatabaseLogger *zap.SugaredLogger
	DebugEnable            bool
)

Functions

func DPanic

func DPanic(c *gin.Context, loggerType LoggerType, args ...interface{})

func DPanicf

func DPanicf(c *gin.Context, loggerType LoggerType, template string,
	args ...interface{})

func Debug

func Debug(c *gin.Context, loggerType LoggerType, args ...interface{})

func Debugf

func Debugf(c *gin.Context, loggerType LoggerType, template string,
	args ...interface{})

func Error

func Error(c *gin.Context, loggerType LoggerType, args ...interface{})

func Errorf

func Errorf(c *gin.Context, loggerType LoggerType, template string,
	args ...interface{})

func Fatal

func Fatal(c *gin.Context, loggerType LoggerType, args ...interface{})

func Fatalf

func Fatalf(c *gin.Context, loggerType LoggerType, template string,
	args ...interface{})

func Info

func Info(c *gin.Context, loggerType LoggerType, args ...interface{})

func Infof

func Infof(c *gin.Context, loggerType LoggerType, template string,
	args ...interface{})

func InitLogger

func InitLogger() (err error)

func JsonObj

func JsonObj(k string, v interface{}) zap.Field

func Panic

func Panic(c *gin.Context, loggerType LoggerType, args ...interface{})

func Panicf

func Panicf(c *gin.Context, loggerType LoggerType, template string,
	args ...interface{})

func SyncLoggers

func SyncLoggers()

SyncLoggers 同步日志实例

func Warn

func Warn(c *gin.Context, loggerType LoggerType, args ...interface{})

func Warnf

func Warnf(c *gin.Context, loggerType LoggerType, template string,
	args ...interface{})

Types

type LoggerType

type LoggerType int

LoggerType 日志器类型

const (
	LOGGER_APP              LoggerType = iota // APP日志器
	LOGGER_ACCESS                             // 访问日志器
	LOGGER_DB                                 // 数据库日志器
	LOGGER_METRIC                             // 指标日志器
	LOGGER_TRACE                              // trace 日志器
	LOGGER_WORKFOLW                           // workflow 日志器
	LOGGER_WORKFLOWDATABASE                   // workflow database 日志器
)

Jump to

Keyboard shortcuts

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