Documentation ¶
Index ¶
- Constants
- Variables
- func DatabaseError(err error, collection string)
- func Debug(args ...interface{})
- func Error(args ...interface{})
- func Fatal(args ...interface{})
- func Info(args ...interface{})
- func Initialize(serverName string, productionEnvironment bool)
- func InjectRequestLogger(logResponseBody bool) gin.HandlerFunc
- func Panic(args ...interface{})
- func Print(args ...interface{})
- func Warn(args ...interface{})
- func Warning(args ...interface{})
- func WithField(key string, value interface{}) *logrus.Entry
- func WithFields(fields logrus.Fields) *logrus.Entry
Constants ¶
View Source
const ( // ErrorContextKey field name of the error in the context, if provided this error will be logged. ErrorContextKey = "request_error" // RequestIDHeaderName header name of the request ID value. RequestIDHeaderName = "X-Request-ID" )
Variables ¶
View Source
var Main *logrus.Entry
Main : main logger of the application
Functions ¶
func DatabaseError ¶
DatabaseError logs a database error.
func Initialize ¶
Initialize initialize the main logger of the application.
func InjectRequestLogger ¶
func InjectRequestLogger(logResponseBody bool) gin.HandlerFunc
InjectRequestLogger log the requests and the responses.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.