ginlog

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TraceIDKey     = "trace_id"
	UserIDKey      = "user_id"
	VersionKey     = "version"
	ServiceNameKey = "service_name"
)

定义键名

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

func Debugf

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

func Error

func Error(args ...interface{})

func Errorf

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

func Fatal

func Fatal(args ...interface{})

func Fatalf

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

func GinLogger

func GinLogger() gin.HandlerFunc

func Info

func Info(args ...interface{})

func Infof

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

func SetDebug

func SetDebug(d bool)

debug: 使用text格式, Level是Debug, 打印所有级别 not debug: 使用json格式, level是Info, 不打印Debug级别

func Warn

func Warn(args ...interface{})

func Warnf

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

func WithField

func WithField(key string, value interface{}) *logrus.Entry

func WithFields

func WithFields(fs logrus.Fields) *logrus.Entry

Types

type MicroLoggerI

type MicroLoggerI struct{}

func NewMicroLogger

func NewMicroLogger() *MicroLoggerI

func (*MicroLoggerI) Log

func (o *MicroLoggerI) Log(v ...interface{})

func (*MicroLoggerI) Logf

func (o *MicroLoggerI) Logf(format string, v ...interface{})

Logf logs formatted using the default logger

type NsqLoggerI

type NsqLoggerI struct{}

func NsqLogger

func NsqLogger() *NsqLoggerI

func (*NsqLoggerI) Output

func (l *NsqLoggerI) Output(calldepth int, s string) error

type OrmLoggerI

type OrmLoggerI struct {
}

func NewGormLogger

func NewGormLogger() *OrmLoggerI

func (*OrmLoggerI) Print

func (o *OrmLoggerI) Print(v ...interface{})

Jump to

Keyboard shortcuts

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