Documentation ¶
Overview ¶
Package logutil provides helper functions for more convenient logging and error tracking.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Critical ¶
Critical creates an error level log event and sends the error to the remote error tracking service.
func Recover ¶
Recover handles recoveries from panics, sends their info to the remote error tracking service and logs them locally. If no panic occurs, nothing will be logged / sent. Map parameter provides additional key-value pairs to include in the log entry (not the remote error tracking event). It can be nil. Function type parameter is called right before message printing. It can be nil. Example: `defer logutil.Recover(log, "cannot continue", map[string]interface{"request_id": "id123"}, cleanupFn)`. or `defer logutil.Recover(log, "cannot continue", nil, nil)`.
Types ¶
This section is empty.