public class LogOptions
extends java.lang.Object
LogOptions.LogLevel
to pick with ones you would like
to see).
You can also use OFF
to shut all logging off, ON
to turn on most helpful logs, and ALL_ON
to turn all logging on for convenience (this one can
cause performance issues during scanning, as it will print a log every time a device is seen).Modifier and Type | Class and Description |
---|---|
static class |
LogOptions.LogLevel
Enumeration for setting the log level of SweetBlue's logger.
|
Modifier and Type | Field and Description |
---|---|
static LogOptions |
ALL_ON
Static instance for turning ALL logging on.
|
static LogOptions |
OFF
Static instance for conveniently shutting off all logging.
|
static LogOptions |
ON
Static instance for turning on most logging.
|
Constructor and Description |
---|
LogOptions() |
LogOptions(LogOptions.LogLevel sweetBlueLevel,
LogOptions.LogLevel nativeLevel) |
Modifier and Type | Method and Description |
---|---|
boolean |
enabled() |
LogOptions |
enableNativeLogs(LogOptions.LogLevel level)
Enable native callback logs with the given
LogOptions.LogLevel |
LogOptions |
enableSweetBlueLogs(LogOptions.LogLevel level)
Enable SweetBlue specific logs with the given
LogOptions.LogLevel |
boolean |
nativeEnabled() |
boolean |
nativeEnabled(int logLevel) |
boolean |
sweetBlueEnabled() |
boolean |
sweetBlueEnabled(int logLevel) |
public static final LogOptions OFF
public static final LogOptions ON
LogOptions.LogLevel.DEBUG
for both SweetBlue and native logs.public static final LogOptions ALL_ON
public LogOptions()
public LogOptions(LogOptions.LogLevel sweetBlueLevel, LogOptions.LogLevel nativeLevel)
public final LogOptions enableSweetBlueLogs(LogOptions.LogLevel level)
LogOptions.LogLevel
public final LogOptions enableNativeLogs(LogOptions.LogLevel level)
LogOptions.LogLevel
public final boolean enabled()
public final boolean sweetBlueEnabled()
public final boolean nativeEnabled()
public final boolean nativeEnabled(int logLevel)
public final boolean sweetBlueEnabled(int logLevel)