Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
Logger is an alternative implementation of *gorm.Logger
func New ¶
func New(origin *zerolog.Logger, opts ...LoggerOption) *Logger
New create logger object for *gorm.DB from *zeroLog.Logger By default it logs with debug level.
type LoggerOption ¶
type LoggerOption func(*Logger)
LoggerOption is an option for Logger.
func WithLevel ¶
func WithLevel(level zerolog.Level) LoggerOption
WithLevel returns Logger option that sets level for gorm logs. It affects only general logs, e.g. those that contain SQL queries. Errors will be logged with error level independently of this option.
Click to show internal directories.
Click to hide internal directories.