Skip to content

⚡ zap logging driver for gorm v2

License

Notifications You must be signed in to change notification settings

dfamartins68/zapgorm2

 
 

Repository files navigation

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)

About

⚡ zap logging driver for gorm v2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 96.5%
  • JavaScript 2.9%
  • Makefile 0.6%