-
public class RxBleLogThis file is a modification of Timber logging library -> https://github.com/JakeWharton/timber
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public @interfaceRxBleLog.LogLevelpublic interfaceRxBleLog.LoggerSimple logging interface for log messages from RxAndroidBle
-
Method Summary
Modifier and Type Method Description static voidsetLogger(@Nullable() RxBleLog.Logger logger)Old method to set a custom logger implementation, set it to {@code null}to use default logcat logging.It updates only the logger object.static voidsetLogLevel(int logLevel)Old method to set log level. static voidupdateLogOptions(LogOptions logOptions)Method to update current logger setup with new LogOptions. static voidv(String message, Array<Object> args)static voidv(Throwable t, String message, Array<Object> args)static voidd(String message, Array<Object> args)static voidd(Throwable t, String message, Array<Object> args)static voidi(String message, Array<Object> args)static voidi(Throwable t, String message, Array<Object> args)static voidw(String message, Array<Object> args)static voidw(Throwable t, String message, Array<Object> args)static voide(String message, Array<Object> args)static voide(Throwable t, String message, Array<Object> args)static booleanisAtLeast(int expectedLogLevel)static intgetMacAddressLogSetting()static intgetUuidLogSetting()static booleangetShouldLogAttributeValues()static booleangetShouldLogScannedPeripherals()-
-
Method Detail
-
setLogger
@Deprecated() static void setLogger(@Nullable() RxBleLog.Logger logger)
Old method to set a custom logger implementation, set it to
{@code null}to use default logcat logging.It updates only the logger object. The rest of log settings remain unchanged.Example how to forward logs to Timber:
RxBleLog.setLogger(new RxBleLog.Logger() { @Override public void log(final int level, final String tag, final String msg) { Timber.tag(tag).log(level, msg); } });
-
setLogLevel
@Deprecated() static void setLogLevel(int logLevel)
Old method to set log level. It updates only the log level value. The rest of log settings remain unchanged.
- Parameters:
logLevel- the log level
-
updateLogOptions
static void updateLogOptions(LogOptions logOptions)
Method to update current logger setup with new LogOptions. Only set options will be updated. Options that were not set or set to nullon the LogOptions will not update the current setup leaving the previous values untouched.
- Parameters:
logOptions- the new log options
-
isAtLeast
static boolean isAtLeast(int expectedLogLevel)
-
getMacAddressLogSetting
static int getMacAddressLogSetting()
-
getUuidLogSetting
static int getUuidLogSetting()
-
getShouldLogAttributeValues
static boolean getShouldLogAttributeValues()
-
getShouldLogScannedPeripherals
static boolean getShouldLogScannedPeripherals()
-
-
-
-