Skip to content
/ zapgorm2 Public
generated from moul/golang-repo-template

⚡ zap logging driver for gorm v2

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

moul/zapgorm2

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)