gormlogger

package
v0.0.0-...-d2c9018 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GormWriter

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

func NewGormWriter

func NewGormWriter(opts ...Option) *GormWriter

func (*GormWriter) FileWithLineNum

func (w *GormWriter) FileWithLineNum() string

拦截打印行号,过滤gen和gorm的行号 FileWithLineNum return the file name and line number of the current file

func (*GormWriter) Printf

func (w *GormWriter) Printf(message string, data ...interface{})

Printf 格式化打印日志 message:%s \n[%.3fms] [rows:%v] %s data:[line,time,rows,sql]

type Option

type Option func(w *GormWriter)

func AddSkip

func AddSkip(skip int) Option

Jump to

Keyboard shortcuts

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