logger

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debugf

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

Debugf logs a message at level Debug on the standard logger.

func Errorf

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

Errorf logs a message at level Error on the standard logger.

func Fatalf

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

Fatalf logs a message at level Fatal on the standard logger.

func GetWriter added in v1.28.0

func GetWriter() *ginWriter

GetWriter returns an io.Writer that writes to our logger

func GinLogger added in v1.28.0

func GinLogger() gin.HandlerFunc

GinLogger returns a Gin middleware that uses our logger format Format matches: INFO 2025-12-23T08:44:20Z 1.1.2 [message] file:... func:...

func GinRecovery added in v1.28.0

func GinRecovery() gin.HandlerFunc

GinRecovery returns a Gin middleware that recovers from panics

func HTTPDebugf added in v1.28.0

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

HTTPDebugf logs a message to the HTTP log.

func HTTPErrorf added in v1.28.0

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

HTTPErrorf logs a message to the HTTP log.

func HTTPInfof added in v1.28.0

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

HTTPInfof logs a message to the HTTP log.

func HTTPWarnf added in v1.28.0

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

HTTPWarnf logs a message to the HTTP log.

func Infof

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

Infof logs a message at level Info on the standard logger.

func SetLogLevel

func SetLogLevel(level logrus.Level)

SetLogLevel sets log level

func Warnf

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

Warnf logs a message at level Warn on the standard logger.

Types

type Adapter added in v1.28.0

type Adapter struct{}

Adapter wraps the logger to implement service.Logger interface with structured logging

func NewAdapter added in v1.28.0

func NewAdapter() *Adapter

NewAdapter creates a new logger adapter

func (*Adapter) Debug added in v1.28.0

func (a *Adapter) Debug(msg string, keysAndValues ...interface{})

func (*Adapter) Error added in v1.28.0

func (a *Adapter) Error(msg string, keysAndValues ...interface{})

func (*Adapter) Info added in v1.28.0

func (a *Adapter) Info(msg string, keysAndValues ...interface{})

func (*Adapter) Infof added in v1.28.0

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

Infof logs a formatted info message (Printf-style)

func (*Adapter) Warn added in v1.28.0

func (a *Adapter) Warn(msg string, keysAndValues ...interface{})

type Fields

type Fields logrus.Fields

Fields sets fields on the logger.

Jump to

Keyboard shortcuts

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