Skip to content

vchitai/logrgorm2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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