Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶ added in v1.6.0
type Option = func(c *logger)
Option is the return type for this module's With* prefixed option helpers.
Those can be provided to Logger in order to customize its behavior.
func WithIgnoreNotFoundError ¶ added in v1.6.0
WithIgnoreNotFoundError allows one to avoid reporting "gorm database error" log entries.
It defaults to true (not reporting those entries).
func WithLogLevel ¶ added in v1.6.0
func WithLogLevel(v gormlogger.LogLevel) Option
WithLogLevel customizes the maximum level at which the GORM system will be allowed to report its log entries. Logs entries below this level are ignored.
It defaults to gormlogger.Warn.
func WithSlowSqlThreshold ¶ added in v1.6.0
WithSlowSqlThreshold customizes a query's elapsed duration after which our logger will start to emit "slow sql" log entries.
Use 0 to disable this feature.
It defaults to 500ms when unspecified.