Documentation ¶
Index ¶
- Constants
- func LogDebug(token, msg string)
- func LogError(token, msg string)
- func LogInfo(token, msg string)
- func LogResponse(token string, req *http.Request, lw *LoggingResponseMetadata, ...)
- func LogWarn(token, msg string)
- func NewLoggerBuilder() *loggerBuilder
- type LoggingResponseMetadata
- type LoggingResponseWriter
Constants ¶
View Source
const ( ENV_NAME = "APP_ENV" ENV_DEV = "dev" )
View Source
const (
// #nosec G101 -- Not a secret
TraceToken = "X-Trace-Token"
)
Variables ¶
This section is empty.
Functions ¶
func LogResponse ¶
func NewLoggerBuilder ¶ added in v1.1.0
func NewLoggerBuilder() *loggerBuilder
Types ¶
type LoggingResponseMetadata ¶
LoggingResponseMetadata wrapper for holding response metadata
type LoggingResponseWriter ¶
type LoggingResponseWriter struct { http.ResponseWriter ResponseMetadata *LoggingResponseMetadata }
LoggingResponseWriter wrapper around the default response writer to enable the logging of the response metadata
func (*LoggingResponseWriter) WriteHeader ¶
func (w *LoggingResponseWriter) WriteHeader(statusCode int)
Click to show internal directories.
Click to hide internal directories.