java.lang.Object | |
↳ | com.salesforce.android.service.common.utilities.logging.ServiceLogging |
Entrance point to the logging library.
Usage example:class MyClass { private static final ServiceLogger log = ServiceLogging.getLogger(MyClass.class); void doStuff() { log.trace("I am doing {}", "stuff"); } }
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
@interface | ServiceLogging.LogLevel |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | LEVEL_DEBUG | ||||||||||
int | LEVEL_ERROR | ||||||||||
int | LEVEL_INFO | ||||||||||
int | LEVEL_NONE | ||||||||||
int | LEVEL_TRACE | ||||||||||
int | LEVEL_WARN |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
public static final ServiceLoggingSink | LOG_CAT_SINK |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static void |
addSink(ServiceLoggingSink sink)
Adds a sink to which formatted log messages should be sent.
| ||||||||||
static int |
getLogLevel()
Gets the current minimum log level.
| ||||||||||
static ServiceLogger |
getLogger(Class<?> forClass)
Creates a new logger.
| ||||||||||
static ServiceLogger |
getLogger(Class<?> forClass, String channel)
Creates a new logger in a specific channel.
| ||||||||||
static void |
setChannelEnabled(String channel, boolean enabled)
Enables or disables a specific logging channel.
| ||||||||||
static void |
setLogLevel(int level)
Sets the minimum log level.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Adds a sink to which formatted log messages should be sent.
Gets the current minimum log level.
Creates a new logger in a specific channel.
Enables or disables a specific logging channel.
Sets the minimum log level. Logs below this level will be efficiently ignored.