-
public class LogOptions.BuilderThe builder for LogOptions If a particular setting will not be defined on the builder the produced LogOptions will not overwrite them in the library when passed to updateLogOptions.
-
-
Field Summary
Fields Modifier and Type Field Description private IntegerlogLevelprivate IntegermacAddressLogSettingprivate IntegeruuidsLogSettingprivate BooleanshouldLogAttributeValuesprivate BooleanshouldLogScannedPeripheralsprivate LogOptions.Loggerlogger
-
Method Summary
Modifier and Type Method Description LogOptions.BuildersetLogLevel(@Nullable() Integer logLevel)Set the log level of the library. LogOptions.BuildersetMacAddressLogSetting(@Nullable() Integer macAddressLogSetting)Set how to log mac addresses:NONE — address will be omitted i.e. LogOptions.BuildersetUuidsLogSetting(@Nullable() Integer uuidsLogSetting)Set how to log uuids:NONE — UUID will be omitted i.e. LogOptions.BuildersetShouldLogAttributeValues(@Nullable() Boolean shouldLogAttributeValues)Set how to log byte array values: false— all byte arrays will be omitted i.e.LogOptions.BuildersetShouldLogScannedPeripherals(@Nullable() Boolean shouldLogScannedPeripherals)Set if scan results should be logged. LogOptions.BuildersetLogger(@Nullable() LogOptions.Logger logger)Set the logger to get the output LogOptionsbuild()-
-
Method Detail
-
setLogLevel
LogOptions.Builder setLogLevel(@Nullable() Integer logLevel)
Set the log level of the library. General rule:
NONE — nothing will get logged
ERROR — only terminal library errors
WARN — the above plus all events that may be handled gracefully or wrong usage of the API
INFO — the above plus all info needed to understand the BLE interactions and debug user's application
DEBUG — the above plus information needed to debug the library
VERBOSE — the above plus some information about the internal working
- Parameters:
logLevel- the log level
-
setMacAddressLogSetting
LogOptions.Builder setMacAddressLogSetting(@Nullable() Integer macAddressLogSetting)
Set how to log mac addresses:
NONE — address will be omitted i.e. 'XX:XX:XX:XX:XX:XX'
MAC_ADDRESS_TRUNCATED — i.e. '00:11:22:33:44:XX'
MAC_ADDRESS_FULL — i.e. '00:11:22:33:44:55'
- Parameters:
macAddressLogSetting- the setting
-
setUuidsLogSetting
LogOptions.Builder setUuidsLogSetting(@Nullable() Integer uuidsLogSetting)
Set how to log uuids:
NONE — UUID will be omitted i.e. '...'
UUIDS_FULL — the full UUID will be logged
- Parameters:
uuidsLogSetting- the setting
-
setShouldLogAttributeValues
LogOptions.Builder setShouldLogAttributeValues(@Nullable() Boolean shouldLogAttributeValues)
Set how to log byte array values:
false— all byte arrays will be omitted i.e. '[...]'true— all byte arrays will be printed in hex i.e. '[FF, FF, FF, FF]'- Parameters:
shouldLogAttributeValues- the setting
-
setShouldLogScannedPeripherals
LogOptions.Builder setShouldLogScannedPeripherals(@Nullable() Boolean shouldLogScannedPeripherals)
Set if scan results should be logged.
- Parameters:
shouldLogScannedPeripherals- the setting
-
setLogger
LogOptions.Builder setLogger(@Nullable() LogOptions.Logger logger)
Set the logger to get the output
- Parameters:
logger- the logger
-
build
LogOptions build()
-
-
-
-