gorm

package
v0.0.0-...-6c2640c Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 7 Imported by: 2

Documentation

Overview

Package gorm Logger Implementation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

Logger logger for gorm

func NewLogger

func NewLogger(name string, opt *log.LoggerOpt) *Logger

NewLogger new logger

func (*Logger) Error

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

Error print error messages

func (*Logger) Info

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

Info print info

func (*Logger) LogMode

func (l *Logger) LogMode(level logger.LogLevel) logger.Interface

LogMode log mode

func (*Logger) Trace

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

Trace print sql message

func (*Logger) Warn

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

Warn print warn messages

Jump to

Keyboard shortcuts

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