logger

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const AuditEventField = "audit_event"

Variables

This section is empty.

Functions

func Log

func Log() *logrus.Logger

Types

type Entry added in v0.18.0

type Entry struct {
	*logrus.Entry
}

func WithContext

func WithContext(ctx context.Context) *Entry

func (*Entry) WithAuditEvent added in v0.18.0

func (e *Entry) WithAuditEvent(event *audit.BasicEvent) *Entry

type GormLogger added in v0.16.0

type GormLogger struct {
	Logger                *logrus.Logger
	SlowThreshold         time.Duration
	SkipErrRecordNotFound bool
}

Inspired by: https://github.com/onrik/gorm-logrus/logger.go MIT License: https://github.com/onrik/gorm-logrus/LICENSE

func NewGormLogger added in v0.16.0

func NewGormLogger(logger *logrus.Logger, slowTreshold time.Duration, skipErrNotFound bool) *GormLogger

func (*GormLogger) Error added in v0.16.0

func (l *GormLogger) Error(ctx context.Context, s string, args ...interface{})

func (*GormLogger) Info added in v0.16.0

func (l *GormLogger) Info(ctx context.Context, s string, args ...interface{})

func (*GormLogger) LogMode added in v0.16.0

func (l *GormLogger) LogMode(glog.LogLevel) glog.Interface

func (*GormLogger) Trace added in v0.16.0

func (l *GormLogger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)

func (*GormLogger) Warn added in v0.16.0

func (l *GormLogger) Warn(ctx context.Context, s string, args ...interface{})

Jump to

Keyboard shortcuts

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