Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogHook ¶
type LogHook struct {
// contains filtered or unexported fields
}
LogHook is a hook.Hook implementation for SQL logging.
func NewLogHook ¶
func NewLogHook(options ...LogHookOption) *LogHook
NewLogHook returns a new LogHook, for a provided list of LogHookOption.
type LogHookOption ¶
type LogHookOption func(o *Options)
LogHookOption are the functional options for LogHook.
func WithArguments ¶
func WithArguments(arguments bool) LogHookOption
WithArguments is used to enable the SQL arguments logging.
func WithExcludedOperations ¶
func WithExcludedOperations(excludedOperations ...sql.Operation) LogHookOption
WithExcludedOperations is used to exclude a list of SQL operations from logging.
func WithLevel ¶
func WithLevel(level zerolog.Level) LogHookOption
WithLevel is used to configure the SQL logging level.
Click to show internal directories.
Click to hide internal directories.