Documentation
¶
Index ¶
- func BuildFormatter(key string) func(data loglight.LogEntry) string
- func DebugFormatter(logEntry loglight.LogEntry) string
- func Initialise(logger *loglight.Logger)
- func LogDebug(logType LogEventType, request *http.Request, additional interface{})
- func LogError(logType LogEventType, request *http.Request, additional interface{})
- func LogInfo(logType LogEventType, request *http.Request, additional interface{})
- type LogEvent
- type LogEventType
- type RequestKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugFormatter ¶
func Initialise ¶
func LogDebug ¶
func LogDebug(logType LogEventType, request *http.Request, additional interface{})
func LogError ¶
func LogError(logType LogEventType, request *http.Request, additional interface{})
func LogInfo ¶
func LogInfo(logType LogEventType, request *http.Request, additional interface{})
Types ¶
type LogEventType ¶
type LogEventType string
const ( GetHealthcheckStart LogEventType = "Get Healthcheck - Start" GetHealthcheckEnd LogEventType = "Get Healthcheck - End" PostEmailStart LogEventType = "Post Email - Start" PostEmailEnd LogEventType = "Post Email - End" PostEmailDebug LogEventType = "Post Email - Debug" PostEmailError LogEventType = "Post Email - Error" Panic LogEventType = "Panic" Api LogEventType = "Api" )
type RequestKey ¶
type RequestKey struct {
// contains filtered or unexported fields
}
func (*RequestKey) Handler ¶
func (c *RequestKey) Handler(h http.Handler) http.Handler
Handler apply the CORS specification on the request, and add relevant CORS headers as necessary.
func (*RequestKey) ServeHTTP ¶
func (key *RequestKey) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.