Skip to content

alc6/zapbun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zap log hook for Bun ORM

Install

go get github.com/alc6/zapbun

Usage

hook := NewQueryHook(logger,
    WithEnabled(false), // with hook log enabled true/false 
    WithVerbose(false), // verbose mode true/false
    WithLevels(queryLevel, errorLevel), // using levels from zapcore.Level
    WithDuration(false), // log the duration true/false
    WithDurationPrecision(time.Millisecond), // usually time.Millisecond/time.Microsecond
)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages