zapgorm

package module
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: MIT Imports: 2 Imported by: 6

README

zapgorm

Zap logging driver for gorm 1.

If you're using gorm v2, please go to https://github.com/moul/zapgorm2

Usage

import "moul.io/zapgorm"

db, _ := gorm.Open("sqlite3", "./db.sqlite")
db.SetLogger(zapgorm.New(zap.L().Named("gorm")))
db.LogMode(true)

Examples in the wild

Documentation

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
}

func New

func New(logger *zap.Logger) Logger

func (Logger) Print

func (l Logger) Print(values ...interface{})

Directories

Path Synopsis
zapgorm2 module

Jump to

Keyboard shortcuts

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