/zapgorm2

zap logging driver for gorm v2

Primary LanguageGoOtherNOASSERTION

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 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)