Documentation ¶
Index ¶
- func Error(msg string)
- func ErrorLogger() (basicLogger *log.Logger, dispose func())
- func ErrorWithRequestID(msg, correlationID string)
- func Fatal(msg string)
- func FatalWithRequestID(msg, correlationID string)
- func Info(msg string)
- func InfoWithRequestID(msg, correlationID string)
- func LogHTTPRequest(req *http.Request)
- func LogHTTPResponse(res *http.Response)
- func SetStandardFields(service, version string)
- func UsePrettyPrint()
- func Warn(msg string)
- func WarnLogger() (basicLogger *log.Logger, dispose func())
- func WarnWithRequestID(msg, correlationID string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorLogger ¶
ErrorLogger creates a logger that can plug in to an HTTP server
func ErrorWithRequestID ¶
func ErrorWithRequestID(msg, correlationID string)
ErrorWithRequestID logs an error level message with standard fields and request_id
func FatalWithRequestID ¶
func FatalWithRequestID(msg, correlationID string)
FatalWithRequestID logs a fatal level message with standard fields and request_id
func InfoWithRequestID ¶
func InfoWithRequestID(msg, correlationID string)
InfoWithRequestID logs an info level message with standard fields and request_id
func LogHTTPRequest ¶
LogHTTPRequest logs an info message with standard fields and extract HTTP specific data from the request
func LogHTTPResponse ¶
LogHTTPResponse logs an info message with standard fields and extract HTTP specific data from the response
func SetStandardFields ¶
func SetStandardFields(service, version string)
SetStandardFields sets up the service name, version, hostname and pid fields
func UsePrettyPrint ¶
func UsePrettyPrint()
UsePrettyPrint tells the logger to print in human readable format
func WarnLogger ¶
WarnLogger creates a logger that can plug in to an HTTP server
func WarnWithRequestID ¶
func WarnWithRequestID(msg, correlationID string)
WarnWithRequestID logs a warn level message with standard fields and request_id
Types ¶
This section is empty.