public class BaseSpectrumLogger extends java.lang.Object implements SpectrumLogger
| Constructor and Description |
|---|
BaseSpectrumLogger() |
| Modifier and Type | Method and Description |
|---|---|
void |
onError(java.lang.Object loggingContext,
java.lang.Exception exception)
Called for any exception that occurs during the operation.
|
void |
onFinish(java.lang.Object loggingContext,
SpectrumResult result)
Called when the operation finishes.
|
java.lang.Object |
onStart(Options options,
java.lang.Object callerContext)
Called before the operation is started.
|
@Nullable public java.lang.Object onStart(Options options, java.lang.Object callerContext)
SpectrumLoggeronStart in interface SpectrumLoggeroptions - The given Options for the operationcallerContext - An integration specific object that provides information about the calling
siteSpectrumLogger.onFinish(java.lang.Object, com.facebook.spectrum.SpectrumResult) and
SpectrumLogger.onError(java.lang.Object, java.lang.Exception) methods are called. This can be used to differentiate operations. Can be
null.public void onError(@Nullable
java.lang.Object loggingContext,
java.lang.Exception exception)
SpectrumLoggeronError in interface SpectrumLoggerloggingContext - The logging context that was returned initially by the SpectrumLogger.onStart(com.facebook.spectrum.options.Options, java.lang.Object)
method (if any).exception - The exception that was thrownpublic void onFinish(@Nullable
java.lang.Object loggingContext,
@Nullable
SpectrumResult result)
SpectrumLoggeronFinish in interface SpectrumLoggerloggingContext - The logging context that was returned initially by the SpectrumLogger.onStart(com.facebook.spectrum.options.Options, java.lang.Object)
method (if any).result - The SpectrumResult returned by the operation