log

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 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 ...any)

BootErrorf logs boot error log

func BootInfof

func BootInfof(format string, args ...any)

BootInfof logs boot info log

func BootWarnf

func BootWarnf(format string, args ...any)

BootWarnf logs boot warn log

func Debugf

func Debugf(format string, args ...any)

Debugf logs debug log with custom format

func DebugfWithRequestId

func DebugfWithRequestId(c *core.Context, format string, args ...any)

DebugfWithRequestId logs debug log with custom format and request id

func Errorf

func Errorf(format string, args ...any)

Errorf logs error log with custom format

func ErrorfWithRequestId

func ErrorfWithRequestId(c *core.Context, format string, args ...any)

ErrorfWithRequestId logs error log with custom format and request id

func ErrorfWithRequestIdAndExtra

func ErrorfWithRequestIdAndExtra(c *core.Context, extraString string, format string, args ...any)

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

func Infof

func Infof(format string, args ...any)

Infof logs info log with custom format

func InfofWithRequestId

func InfofWithRequestId(c *core.Context, format string, args ...any)

InfofWithRequestId logs info log with custom format and request id

func Requestf

func Requestf(c *core.Context, format string, args ...any)

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 ...any)

SqlQuery logs sql query log

func SqlQueryf

func SqlQueryf(format string, args ...any)

SqlQueryf logs sql query log with custom format

func Warnf

func Warnf(format string, args ...any)

Warnf logs warn log with custom format

func WarnfWithRequestId

func WarnfWithRequestId(c *core.Context, format string, args ...any)

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