log

package
v0.0.0-...-d30cded Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BootErrorf

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

BootErrorf logs boot error log

func BootInfof

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

BootInfof logs boot info log

func BootWarnf

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

BootWarnf logs boot warn log

func Debugf

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

Debugf logs debug log with custom format

func DebugfWithRequestId

func DebugfWithRequestId(c *core.Context, format string, args ...interface{})

DebugfWithRequestId logs debug log with custom format and request id

func Errorf

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

Errorf logs error log with custom format

func ErrorfWithRequestId

func ErrorfWithRequestId(c *core.Context, format string, args ...interface{})

ErrorfWithRequestId logs error log with custom format and request id

func ErrorfWithRequestIdAndExtra

func ErrorfWithRequestIdAndExtra(c *core.Context, extraString string, format string, args ...interface{})

ErrorfWithRequestIdAndExtra logs error log with custom format and request id and extra info

func Infof

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

Infof logs info log with custom format

func InfofWithRequestId

func InfofWithRequestId(c *core.Context, format string, args ...interface{})

InfofWithRequestId logs info log with custom format and request id

func Requestf

func Requestf(c *core.Context, format string, args ...interface{})

Requestf logs http request log with custom format

func SetLoggerConfiguration

func SetLoggerConfiguration(config *settings.Config, isDisableBootLog bool) error

SetLoggerConfiguration sets the logger according to the config

func SqlQuery

func SqlQuery(args ...interface{})

SqlQuery logs sql query log

func SqlQueryf

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

SqlQueryf logs sql query log with custom format

func Warnf

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

Warnf logs warn log with custom format

func WarnfWithRequestId

func WarnfWithRequestId(c *core.Context, format string, args ...interface{})

WarnfWithRequestId logs warn log with custom format and request id

Types

type LogFormatter

type LogFormatter struct {
	Prefix       string
	DisableLevel bool
}

LogFormatter represents a log formatter

func (*LogFormatter) Format

func (f *LogFormatter) Format(entry *logrus.Entry) ([]byte, error)

Format writes to log according to the log entry

Jump to

Keyboard shortcuts

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