public class SpectrumLogcatLogger extends BaseSpectrumLogger
SpectrumLogger which logs to Android's main log using Log.
Use `adb logcat -s SpectrumLogger` on your developer machine to see the output.
| Constructor and Description |
|---|
SpectrumLogcatLogger()
Creates a new LogcatLogger that informative messages logs at level
Log.DEBUG and error
messages at level Log.WARN. |
SpectrumLogcatLogger(int logLevel)
Creates a new LogcatLogger with the given log level for informational messages.
|
SpectrumLogcatLogger(int logLevel,
int errorLogLevel)
Creates a new LogcatLogger with the given log and error level
|
| 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.
|
public SpectrumLogcatLogger()
Log.DEBUG and error
messages at level Log.WARN.public SpectrumLogcatLogger(int logLevel)
Log.WARN.logLevel - Informative log level as defined in Logpublic SpectrumLogcatLogger(int logLevel,
int errorLogLevel)
logLevel - Informative log level as defined in LoglogLevel - Error log level as defined in Log@Nullable public java.lang.Object onStart(Options options, java.lang.Object callerContext)
SpectrumLoggeronStart in interface SpectrumLoggeronStart in class BaseSpectrumLoggeroptions - 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 SpectrumLoggeronError in class BaseSpectrumLoggerloggingContext - 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 SpectrumLoggeronFinish in class BaseSpectrumLoggerloggingContext - 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