Documentation
¶
Index ¶
- Variables
- func Debug(message string, data Data)
- func DebugC(correlationKey string, message string, data Data)
- func DebugCtx(ctx context.Context, message string, data Data)
- func DebugR(req *http.Request, message string, data Data)
- func Error(err error, data Data)
- func ErrorC(correlationKey string, err error, data Data)
- func ErrorCtx(ctx context.Context, err error, data Data)
- func ErrorR(req *http.Request, err error, data Data)
- func GetRequestID(req *http.Request) string
- func Handler(h http.Handler) http.Handler
- func Info(message string, data Data)
- func InfoC(correlationKey string, message string, data Data)
- func InfoCtx(ctx context.Context, message string, data Data)
- func InfoR(req *http.Request, message string, data Data)
- func Trace(message string, data Data)
- func TraceC(correlationKey string, message string, data Data)
- func TraceCtx(ctx context.Context, message string, data Data)
- func TraceR(req *http.Request, message string, data Data)
- type Data
Constants ¶
This section is empty.
Variables ¶
View Source
var Event = event
Event records an event
View Source
var HumanReadable bool
HumanReadable represents a flag to determine if log events will be in a human readable format
View Source
var Namespace = "service-namespace"
Namespace is the service namespace used for logging
Functions ¶
func DebugCtx ¶
DebugCtx is a structured debug message and retrieves the correlationKey from go context
func ErrorCtx ¶
ErrorCtx is a structured error message and retrieves the correlationKey from go context
func GetRequestID ¶
GetRequestID returns the request ID from a request (using X-Request-Id)
func InfoCtx ¶
InfoCtx is a structured info message and retrieves the correlationKey from go context
Types ¶
Click to show internal directories.
Click to hide internal directories.