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 TypeMethodDescriptionvoid
close()
Closes outRollbar
void
Sends aLevel.CRITICAL
errorvoid
Sends aLevel.CRITICAL
errorvoid
Sends aLevel.CRITICAL
errorvoid
Sends aLevel.CRITICAL
errorvoid
Sends aLevel.CRITICAL
errorvoid
Sends aLevel.CRITICAL
errorvoid
Sends aLevel.CRITICAL
errorvoid
Sends aLevel.DEBUG
errorvoid
Sends aLevel.DEBUG
errorvoid
Sends aLevel.DEBUG
errorvoid
Sends aLevel.DEBUG
errorvoid
Sends aLevel.DEBUG
errorvoid
Sends aLevel.DEBUG
errorvoid
enable()
Enables sending Rollbar exception reports and prints the disable/GDPR info to the consolevoid
Sends aLevel.ERROR
errorvoid
Sends aLevel.ERROR
errorvoid
Sends aLevel.ERROR
errorvoid
Sends aLevel.ERROR
errorvoid
Sends aLevel.ERROR
errorvoid
Sends aLevel.ERROR
errorvoid
Sends aLevel.ERROR
errorcom.rollbar.notifier.Rollbar
Returns the underlyingRollbar
objectvoid
Sends aLevel.INFO
errorvoid
Sends aLevel.INFO
errorvoid
Sends aLevel.INFO
errorvoid
Sends aLevel.INFO
errorvoid
Sends aLevel.INFO
errorvoid
Sends aLevel.INFO
errorstatic RollbarProvider
instance()
Instanceboolean
Indicates if sending exceptions is enabledlocalsToCustom
(String[] names, Object[] values) Creates a newcustom
map and adds the provided local variables to a sub-objectvoid
Sends aLevel.WARNING
errorvoid
Sends aLevel.WARNING
errorvoid
Sends aLevel.WARNING
errorvoid
Sends aLevel.WARNING
errorvoid
Sends aLevel.WARNING
errorvoid
Sends aLevel.WARNING
error
-
Method Details
-
instance
Instance- Returns:
- an instance of
RollbarProvider
-
localsToCustom
Creates a newcustom
map 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
Map
with the varibles/values added as a sub-map
-
getRollbar
public com.rollbar.notifier.Rollbar getRollbar()Returns the underlyingRollbar
object- Returns:
- the
Rollbar
object
-
isEnabled
public boolean isEnabled()Indicates if sending exceptions is enabledNOTE: Only affects methods provided by
RollbarProvider
, not methods in the underlyingRollbar
object- Returns:
true
if enabled
-
enable
public void enable()Enables sending Rollbar exception reports and prints the disable/GDPR info to the console -
critical
Sends aLevel.CRITICAL
error- Parameters:
error
- the error
-
critical
Sends aLevel.CRITICAL
error- Parameters:
error
- the errordescription
- a description of the error
-
critical
Sends aLevel.CRITICAL
error- Parameters:
error
- the errorcustom
- aMap
of custom data to include with the report
-
critical
Sends aLevel.CRITICAL
error- Parameters:
message
- the error message
-
critical
Sends aLevel.CRITICAL
error- Parameters:
message
- the error messagecustom
- aMap
of custom data to include with the report
-
critical
Sends aLevel.CRITICAL
error- Parameters:
error
- the errorcustom
- aMap
of 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.CRITICAL
error- Parameters:
error
- the errorcustom
- aMap
of custom data to include with the reportdescription
- a description of the errorisUncaught
-true
if this error should be reported as an uncaught exception
-
error
Sends aLevel.ERROR
error- Parameters:
error
- the error
-
error
Sends aLevel.ERROR
error- Parameters:
error
- the errordescription
- a description of the error
-
error
Sends aLevel.ERROR
error- Parameters:
error
- the errorcustom
- aMap
of custom data to include with the report
-
error
Sends aLevel.ERROR
error- Parameters:
message
- the error message
-
error
Sends aLevel.ERROR
error- Parameters:
message
- the error messagecustom
- aMap
of custom data to include with the report
-
error
Sends aLevel.ERROR
error- Parameters:
error
- the errorcustom
- aMap
of 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.ERROR
error- Parameters:
error
- the errorcustom
- aMap
of custom data to include with the reportdescription
- a description of the errorisUncaught
-true
if this error should be reported as an uncaught exception
-
warning
Sends aLevel.WARNING
error- Parameters:
error
- the error
-
warning
Sends aLevel.WARNING
error- Parameters:
error
- the errordescription
- a description of the error
-
warning
Sends aLevel.WARNING
error- Parameters:
error
- the errorcustom
- aMap
of custom data to include with the report
-
warning
Sends aLevel.WARNING
error- Parameters:
message
- the error message
-
warning
Sends aLevel.WARNING
error- Parameters:
message
- the error messagecustom
- aMap
of custom data to include with the report
-
warning
Sends aLevel.WARNING
error- Parameters:
error
- the errorcustom
- aMap
of custom data to include with the reportdescription
- a description of the error
-
info
Sends aLevel.INFO
error- Parameters:
error
- the error
-
info
Sends aLevel.INFO
error- Parameters:
error
- the errordescription
- a description of the error
-
info
Sends aLevel.INFO
error- Parameters:
error
- the errorcustom
- aMap
of custom data to include with the report
-
info
Sends aLevel.INFO
error- Parameters:
message
- the error message
-
info
Sends aLevel.INFO
error- Parameters:
message
- the error messagecustom
- aMap
of custom data to include with the report
-
info
Sends aLevel.INFO
error- Parameters:
error
- the errorcustom
- aMap
of custom data to include with the reportdescription
- a description of the error
-
debug
Sends aLevel.DEBUG
error- Parameters:
error
- the error
-
debug
Sends aLevel.DEBUG
error- Parameters:
error
- the errordescription
- a description of the error
-
debug
Sends aLevel.DEBUG
error- Parameters:
error
- the errorcustom
- aMap
of custom data to include with the report
-
debug
Sends aLevel.DEBUG
error- Parameters:
message
- the error message
-
debug
Sends aLevel.DEBUG
error- Parameters:
message
- the error messagecustom
- aMap
of custom data to include with the report
-
debug
Sends aLevel.DEBUG
error- Parameters:
error
- the errorcustom
- aMap
of custom data to include with the reportdescription
- a description of the error
-
close
public void close()Closes outRollbar
- Specified by:
close
in interfaceAutoCloseable
-