Package com.gmt2001
Class RollbarProvider
java.lang.Object
com.gmt2001.RollbarProvider
- All Implemented Interfaces:
AutoCloseable
Provides Rollbar exception reporting
Currently set to only transmit errors at Level.ERROR and Level.CRITICAL
- Author:
- gmt2001
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes outRollbarvoidSends aLevel.CRITICALerrorvoidSends aLevel.CRITICALerrorvoidSends aLevel.CRITICALerrorvoidSends aLevel.CRITICALerrorvoidSends aLevel.CRITICALerrorvoidSends aLevel.CRITICALerrorvoidSends aLevel.CRITICALerrorvoidSends aLevel.DEBUGerrorvoidSends aLevel.DEBUGerrorvoidSends aLevel.DEBUGerrorvoidSends aLevel.DEBUGerrorvoidSends aLevel.DEBUGerrorvoidSends aLevel.DEBUGerrorvoidenable()Enables sending Rollbar exception reports and prints the disable/GDPR info to the consolevoidSends aLevel.ERRORerrorvoidSends aLevel.ERRORerrorvoidSends aLevel.ERRORerrorvoidSends aLevel.ERRORerrorvoidSends aLevel.ERRORerrorvoidSends aLevel.ERRORerrorvoidSends aLevel.ERRORerrorcom.rollbar.notifier.RollbarReturns the underlyingRollbarobjectvoidSends aLevel.INFOerrorvoidSends aLevel.INFOerrorvoidSends aLevel.INFOerrorvoidSends aLevel.INFOerrorvoidSends aLevel.INFOerrorvoidSends aLevel.INFOerrorstatic RollbarProviderinstance()InstancebooleanIndicates if sending exceptions is enabledlocalsToCustom(String[] names, Object[] values) Creates a newcustommap and adds the provided local variables to a sub-objectvoidSends aLevel.WARNINGerrorvoidSends aLevel.WARNINGerrorvoidSends aLevel.WARNINGerrorvoidSends aLevel.WARNINGerrorvoidSends aLevel.WARNINGerrorvoidSends aLevel.WARNINGerror
-
Method Details
-
instance
Instance- Returns:
- an instance of
RollbarProvider
-
localsToCustom
Creates a newcustommap and adds the provided local variables to a sub-object- Parameters:
names- a list of variable namesvalues- a list of varible values- Returns:
- a new
Mapwith the varibles/values added as a sub-map
-
getRollbar
public com.rollbar.notifier.Rollbar getRollbar()Returns the underlyingRollbarobject- Returns:
- the
Rollbarobject
-
isEnabled
public boolean isEnabled()Indicates if sending exceptions is enabledNOTE: Only affects methods provided by
RollbarProvider, not methods in the underlyingRollbarobject- Returns:
trueif enabled
-
enable
public void enable()Enables sending Rollbar exception reports and prints the disable/GDPR info to the console -
critical
Sends aLevel.CRITICALerror- Parameters:
error- the error
-
critical
Sends aLevel.CRITICALerror- Parameters:
error- the errordescription- a description of the error
-
critical
Sends aLevel.CRITICALerror- Parameters:
error- the errorcustom- aMapof custom data to include with the report
-
critical
Sends aLevel.CRITICALerror- Parameters:
message- the error message
-
critical
Sends aLevel.CRITICALerror- Parameters:
message- the error messagecustom- aMapof custom data to include with the report
-
critical
Sends aLevel.CRITICALerror- Parameters:
error- the errorcustom- aMapof custom data to include with the reportdescription- a description of the error
-
critical
public void critical(Throwable error, Map<String, Object> custom, String description, boolean isUncaught) Sends aLevel.CRITICALerror- Parameters:
error- the errorcustom- aMapof custom data to include with the reportdescription- a description of the errorisUncaught-trueif this error should be reported as an uncaught exception
-
error
Sends aLevel.ERRORerror- Parameters:
error- the error
-
error
Sends aLevel.ERRORerror- Parameters:
error- the errordescription- a description of the error
-
error
Sends aLevel.ERRORerror- Parameters:
error- the errorcustom- aMapof custom data to include with the report
-
error
Sends aLevel.ERRORerror- Parameters:
message- the error message
-
error
Sends aLevel.ERRORerror- Parameters:
message- the error messagecustom- aMapof custom data to include with the report
-
error
Sends aLevel.ERRORerror- Parameters:
error- the errorcustom- aMapof custom data to include with the reportdescription- a description of the error
-
error
public void error(Throwable error, Map<String, Object> custom, String description, boolean isUncaught) Sends aLevel.ERRORerror- Parameters:
error- the errorcustom- aMapof custom data to include with the reportdescription- a description of the errorisUncaught-trueif this error should be reported as an uncaught exception
-
warning
Sends aLevel.WARNINGerror- Parameters:
error- the error
-
warning
Sends aLevel.WARNINGerror- Parameters:
error- the errordescription- a description of the error
-
warning
Sends aLevel.WARNINGerror- Parameters:
error- the errorcustom- aMapof custom data to include with the report
-
warning
Sends aLevel.WARNINGerror- Parameters:
message- the error message
-
warning
Sends aLevel.WARNINGerror- Parameters:
message- the error messagecustom- aMapof custom data to include with the report
-
warning
Sends aLevel.WARNINGerror- Parameters:
error- the errorcustom- aMapof custom data to include with the reportdescription- a description of the error
-
info
Sends aLevel.INFOerror- Parameters:
error- the error
-
info
Sends aLevel.INFOerror- Parameters:
error- the errordescription- a description of the error
-
info
Sends aLevel.INFOerror- Parameters:
error- the errorcustom- aMapof custom data to include with the report
-
info
Sends aLevel.INFOerror- Parameters:
message- the error message
-
info
Sends aLevel.INFOerror- Parameters:
message- the error messagecustom- aMapof custom data to include with the report
-
info
Sends aLevel.INFOerror- Parameters:
error- the errorcustom- aMapof custom data to include with the reportdescription- a description of the error
-
debug
Sends aLevel.DEBUGerror- Parameters:
error- the error
-
debug
Sends aLevel.DEBUGerror- Parameters:
error- the errordescription- a description of the error
-
debug
Sends aLevel.DEBUGerror- Parameters:
error- the errorcustom- aMapof custom data to include with the report
-
debug
Sends aLevel.DEBUGerror- Parameters:
message- the error message
-
debug
Sends aLevel.DEBUGerror- Parameters:
message- the error messagecustom- aMapof custom data to include with the report
-
debug
Sends aLevel.DEBUGerror- Parameters:
error- the errorcustom- aMapof custom data to include with the reportdescription- a description of the error
-
close
public void close()Closes outRollbar- Specified by:
closein interfaceAutoCloseable
-