package logrusbun
Import Path
github.com/oiime/logrusbun (on go.dev)
Dependency Relation
imports 9 packages, and imported by one package
Involved Source Files
logrusbun.go
Package-Level Type Names (total 3, all are exported)
LogEntryVars variables made available t otemplate
Duration time.Duration
Error error
Operation string
Query string
Timestamp time.Time
QueryHook wraps query hook
errorTemplate *template.Template
messageTemplate *template.Template
opts QueryHookOptions
AfterQuery convert a bun QueryEvent into a logrus message
BeforeQuery does nothing tbh
*T : github.com/uptrace/bun.QueryHook
func NewQueryHook(opts QueryHookOptions) *QueryHook
QueryHookOptions logging options
ErrorLevel logrus.Level
ErrorTemplate string
LogSlow time.Duration
Logger logrus.FieldLogger
MessageTemplate string
QueryLevel logrus.Level
SlowLevel logrus.Level
func NewQueryHook(opts QueryHookOptions) *QueryHook
Package-Level Functions (total 3, in which 1 are exported)
NewQueryHook returns new instance
![]() |
The pages are generated with Golds v0.3.6. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |