Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 2.24 KB

README.md

File metadata and controls

47 lines (31 loc) · 2.24 KB

zapgorm2

😄 zapgorm2 is a zap logging driver for gorm v2

go.dev reference License GitHub release Made by Manfred Touron

CI Release GolangCI codecov Go Report Card CodeFactor

If you're using gorm v1, you can use https://github.com/moul/zapgorm instead.

Usage

import "moul.io/zapgorm2"

logger := zapgorm2.New(zap.L())
logger.SetAsDefault() // optional: configure gorm to use this zapgorm.Logger for callbacks
db, err = gorm.Open(sqlite.Open("./db.sqlite"), &gorm.Config{Logger: logger})

Install

Using go

$ go get -u moul.io/zapgorm2

Stargazers over time

Stargazers over time

License

© 2020-2021 Manfred Touron

Licensed under the Apache License, Version 2.0 (LICENSE-APACHE) or the MIT license (LICENSE-MIT), at your option. See the COPYRIGHT file for more details.

SPDX-License-Identifier: (Apache-2.0 OR MIT)