vchitai / logrgorm2

logrgorm2 is a logr logging driver for gorm v2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

logrgorm2

😄 logrgorm2 is a logr logging driver for gorm v2

go.dev reference License GitHub release Made by Vchitai

GolangCI codecov Go Report Card CodeFactor

Usage

import "github.com/vchitai/logrgorm2"

stdr.SetVerbosity(1)
logger := stdr.NewWithOptions(stdlog.New(os.Stderr, "", stdlog.LstdFlags), stdr.Options{LogCaller: stdr.All})
logger = logger.WithName("logr")
db, err = gorm.Open(sqlite.Open("./db.sqlite"), &gorm.Config{Logger: logger})

Install

Using go

$ go get -u github.com/vchitai/logrgorm2

About

logrgorm2 is a logr logging driver for gorm v2

License:MIT License


Languages

Language:Go 76.9%Language:Makefile 23.1%