logger

package
v0.58.3 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const AuditEventField = "audit_event"

Variables

This section is empty.

Functions

func IsErrLog added in v0.31.2

func IsErrLog(p []byte) bool

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) EWithFields added in v0.30.0

func (e *Entry) EWithFields(fields map[string]interface{}) *Entry

func (*Entry) PushWithAuditEvent added in v0.23.0

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

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{})

type SentryHook added in v0.53.0

type SentryHook struct{}

func (SentryHook) Fire added in v0.53.0

func (h SentryHook) Fire(entry *logrus.Entry) error

func (SentryHook) Levels added in v0.53.0

func (h SentryHook) Levels() []logrus.Level

type Writer added in v0.31.2

type Writer struct{}

Writer writes to stdout or stderr depending on severity level.

func (Writer) Write added in v0.31.2

func (Writer) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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