Documentation ¶
Index ¶
- Variables
- func CloseClient()
- func InitErrorReporting(ctx context.Context, projectID, serviceName, serviceVersion string) error
- func ReportPanics(ctx context.Context) func()
- func SetUpErrorReporting(ctx context.Context, projectID, serviceName, serviceVersion string) (client *errorreporting.Client, reportPanics func())deprecated
- type Config
- type UnaLogger
Constants ¶
This section is empty.
Variables ¶
var ExitOnPanic = true
ExitOnPanic makes it possible to disable exiting in ReportPanics
Functions ¶
func CloseClient ¶
func CloseClient()
CloseClient should be deferred right after calling InitErrorReporting to enure that the client is closed down gracefully
func InitErrorReporting ¶
InitErrorReporting will enable the errors of all calls to Error and Fatal to be sent to Google Error Reporting It also enables the
func ReportPanics ¶
ReportPanics should be defered in every new scope where you want to catch pancis and have them pass on to Stackdriver Error Reporting
func SetUpErrorReporting
deprecated
func SetUpErrorReporting(ctx context.Context, projectID, serviceName, serviceVersion string) (client *errorreporting.Client, reportPanics func())
Deprecated: The functionality is split into InitErrorReporting, ReportPanics and CloseClient instead SetUpErrorReporting creates an ErrorReporting client and returns that client together with a reportPanics function. That function should be defered in every new scope where you want to catch pancis and have them pass on to Stackdriver Error Reporting
Types ¶
type UnaLogger ¶
type UnaLogger interface { Debug(msg string, args ...interface{}) Info(msg string, args ...interface{}) Error(msg string, err error, args ...interface{}) Fatal(msg string, err error, args ...interface{}) Underlying() log.Logger }
UnaLogger wraps a logxi logger and delegate to some of it's logging methods