gormlogger

package
v2.13.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GormLogger

type GormLogger struct {
	DBName string
	DBHost string
	// contains filtered or unexported fields
}

GormLogger 面向 Gorm 的 Logger

func New

func New(host, name string) *GormLogger

New Create new logger with custom database name and host Defaults to use logrus.INFO level.

func NewWithLevel

func NewWithLevel(host, name string, level log.Level) *GormLogger

NewWithLevel Create new logger with custom database name, host and logurs.Level

func NewWithLogger

func NewWithLogger(host, name string, logger *log.Logger, level log.Level) *GormLogger

NewWithLogger Create new logger with custom database name, host and logger

func (*GormLogger) Print

func (l *GormLogger) Print(values ...interface{})

Print 打印日志

Jump to

Keyboard shortcuts

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