logger

package
v0.0.0-...-3578700 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

FIXME: golangci-lint nolint:govet,revive

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlushLogger

func FlushLogger()

FlushLogger Flush batched logging messages

func InitLogger

func InitLogger(writer io.Writer)

InitLogger initializes the API logger

func LogErrorAndPanic

func LogErrorAndPanic(msg string, err error)

LogErrorAndPanic Records the error, flushes the buffer, then panics the container

Types

type GormLogger

type GormLogger struct {
	// contains filtered or unexported fields
}

GormLogger is a custom logger for GORM

func NewGormLogger

func NewGormLogger(logger *logrus.Logger) *GormLogger

NewGormLogger creates a new instance of GormLogger

func (*GormLogger) Error

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

Error logs an error message

func (*GormLogger) Info

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

Info logs an info message

func (*GormLogger) LogMode

LogMode sets the log mode for GORM

func (*GormLogger) Trace

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

Trace logs a SQL query

func (*GormLogger) Warn

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

Warn logs a warning message

Jump to

Keyboard shortcuts

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