Documentation ¶
Index ¶
- Constants
- type Logger
- func (logger *Logger) ContextLoggingFn(c *gin.Context) LoggingFn
- func (logger *Logger) Debugc(c *gin.Context, msg string, keysAndValues ...interface{})
- func (logger *Logger) Errorc(c *gin.Context, msg string, keysAndValues ...interface{})
- func (logger *Logger) Infoc(c *gin.Context, msg string, keysAndValues ...interface{})
- func (logger *Logger) Warnc(c *gin.Context, msg string, keysAndValues ...interface{})
- type LoggerOptions
- type LoggingFn
Constants ¶
View Source
const ( DebugLevel logLevel = "DEBUG" InfoLevel logLevel = "INFO" WarnLevel logLevel = "WARN" ErrorLevel logLevel = "ERROR" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
*zap.SugaredLogger
}
Logger handles all logger from application
func NewLogger ¶
func NewLogger(options LoggerOptions) (*Logger, error)
NewLogger creates a new Logger instance
func (*Logger) ContextLoggingFn ¶
ContextLoggingFn creates a LoggingFn to be used in places that do not necessarily need access to the gin context
type LoggerOptions ¶ added in v0.5.0
LoggerOptions are options for constructing a Logger
Click to show internal directories.
Click to hide internal directories.