Documentation ¶
Overview ¶
Package logger is the logger builder.
Index ¶
Constants ¶
View Source
const ( KeyRequestID string = "requestID" KeyUsername string = "username" )
Defines common log fields.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogOptions ¶
type LogOptions struct { Name string Development bool DisableCaller bool `mapstructure:"disable-caller"` }
LogOptions defines options for building a logger.
type Logger ¶
type Logger struct {
*zap.SugaredLogger
}
func NewGormLogger ¶ added in v0.2.0
func NewGormLogger() *Logger
NewGormLogger creates a gorm logger.
func (*Logger) Named ¶
Named adds a new path segment to the logger's name. Segments are joined by periods. By default, Loggers are unnamed.
Click to show internal directories.
Click to hide internal directories.