public static class LogOptions.Builder
extends java.lang.Object
#LogOptions(Integer, Integer, Integer, Boolean, Boolean, Logger)
If a particular setting will not be defined on the builder the produced
#LogOptions(Integer, Integer, Integer, Boolean, Boolean, Logger) will not overwrite them in the library when passed to
RxBleClient.updateLogOptions(LogOptions).| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
LogOptions |
build() |
LogOptions.Builder |
setLogger(LogOptions.Logger logger)
Set the logger to get the output
|
LogOptions.Builder |
setLogLevel(java.lang.Integer logLevel)
Set the log level of the library.
|
LogOptions.Builder |
setMacAddressLogSetting(java.lang.Integer macAddressLogSetting)
Set how to log mac addresses:
|
LogOptions.Builder |
setShouldLogAttributeValues(java.lang.Boolean shouldLogAttributeValues)
Set how to log byte array values:
|
LogOptions.Builder |
setShouldLogScannedPeripherals(java.lang.Boolean shouldLogScannedPeripherals)
Set if scan results should be logged.
|
LogOptions.Builder |
setUuidsLogSetting(java.lang.Integer uuidsLogSetting)
Set how to log uuids:
|
public LogOptions.Builder setLogLevel(java.lang.Integer logLevel)
LogConstants.NONE — nothing will get logged
LogConstants.ERROR — only terminal library errors
LogConstants.WARN — the above plus all events that may be handled gracefully or wrong usage of the API
LogConstants.INFO — the above plus all info needed to understand the BLE interactions and debug user's application
LogConstants.DEBUG — the above plus information needed to debug the library
LogConstants.VERBOSE — the above plus some information about the internal working
logLevel - the log levelpublic LogOptions.Builder setMacAddressLogSetting(java.lang.Integer macAddressLogSetting)
LogConstants.NONE — address will be omitted i.e. 'XX:XX:XX:XX:XX:XX'
LogConstants.MAC_ADDRESS_TRUNCATED — i.e. '00:11:22:33:44:XX'
LogConstants.MAC_ADDRESS_FULL — i.e. '00:11:22:33:44:55'
macAddressLogSetting - the settingpublic LogOptions.Builder setUuidsLogSetting(java.lang.Integer uuidsLogSetting)
LogConstants.NONE — UUID will be omitted i.e. '...'
LogConstants.UUIDS_FULL — the full UUID will be logged
uuidsLogSetting - the settingpublic LogOptions.Builder setShouldLogAttributeValues(java.lang.Boolean shouldLogAttributeValues)
false — all byte arrays will be omitted i.e. '[...]'
true — all byte arrays will be printed in hex i.e. '[FF, FF, FF, FF]'
shouldLogAttributeValues - the settingpublic LogOptions.Builder setShouldLogScannedPeripherals(java.lang.Boolean shouldLogScannedPeripherals)
shouldLogScannedPeripherals - the settingpublic LogOptions.Builder setLogger(LogOptions.Logger logger)
logger - the loggerpublic LogOptions build()