public final class WZLog extends Object
WZLog
class provides a collection of static API methods for sending logging output.
private final static String TAG = "MyClassName";
WZLog.LOGGING_ENABLED = true;
WZLog.info(TAG, "Become a Wowza Ninja today!");
try {
... code which throws an exception ...
} catch (Exception e) {
WZLog.error(TAG, "An error occurred", e);
}
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_LOGGING_TAG |
static int |
LOG_LEVEL_DEBUG |
static int |
LOG_LEVEL_ERROR |
static int |
LOG_LEVEL_INFO |
static int |
LOG_LEVEL_VERBOSE |
static int |
LOG_LEVEL_WARN |
static boolean |
LOGGING_ENABLED
The SDK will not produce log output if
WZLog.LOGGING_ENABLED is set to false (the default). |
static int |
MAX_LOG_LEVEL |
static int |
MIN_LOG_LEVEL |
Constructor and Description |
---|
WZLog() |
Modifier and Type | Method and Description |
---|---|
static void |
debug(String message)
Send an debug-level log message with the default logging tag
|
static void |
debug(String tag,
String message)
Send an debug-level log message
|
static void |
error(String message)
Send an error message with the default logging tag
|
static void |
error(String tag,
String message)
Send an error message
|
static void |
error(String tag,
String message,
Throwable throwable)
Send an error message with an exception to log
|
static void |
error(String tag,
Throwable throwable)
Send an exception to log
|
static void |
error(String tag,
WZError error)
Send an error message
|
static void |
error(String tag,
WZError error,
Throwable throwable)
Send an error message
|
static void |
error(Throwable throwable)
Send an exception to log with the default logging tag
|
static void |
error(WZError error)
Send an error message with the default logging tag
|
static void |
error(WZError error,
Throwable throwable)
Send an error message with the default logging tag
|
static WZLogger |
getLogger()
Returns the currently registered logger instance.
|
static void |
info(String message)
Send an informational-level log message with the default logging tag
|
static void |
info(String tag,
String message)
Send an informational-level log message
|
static boolean |
isValidLogLevel(int logLevel) |
static void |
registerLogger(WZLogger logger)
Register a custom logger instance.
|
static void |
unregisterLogger(WZLogger logger)
Unregister a custom logger instance.
|
static void |
verbose(String message)
Send an informational-level log message with the default logging tag
|
static void |
verbose(String tag,
String message)
Send a verbose-level log message
|
static void |
warn(String message)
Send an warning-level log message with the default logging tag
|
static void |
warn(String tag,
String message)
Send an warning-level log message
|
static void |
warn(String tag,
WZError warning)
Send an warning-level log message
|
static void |
warn(WZError warning)
Send a warning-level message with the default logging tag
|
public static final String DEFAULT_LOGGING_TAG
public static final int LOG_LEVEL_VERBOSE
public static final int LOG_LEVEL_DEBUG
public static final int LOG_LEVEL_INFO
public static final int LOG_LEVEL_WARN
public static final int LOG_LEVEL_ERROR
public static final int MIN_LOG_LEVEL
public static final int MAX_LOG_LEVEL
public static boolean LOGGING_ENABLED
WZLog.LOGGING_ENABLED
is set to false
(the default).public static boolean isValidLogLevel(int logLevel)
public static void registerLogger(WZLogger logger)
WZLogger
for information on writing a custom logger.logger
- An instance of a custom logger classpublic static void unregisterLogger(WZLogger logger)
logger
- An instance of a custom logger class previously registered with registerLogger(WZLogger)
public static WZLogger getLogger()
public static void verbose(String tag, String message)
tag
- Identifies the source of a log message.message
- The log messagepublic static void verbose(String message)
message
- The log messagepublic static void info(String tag, String message)
tag
- Identifies the source of a log message.message
- The log messagepublic static void info(String message)
message
- The log messagepublic static void debug(String tag, String message)
tag
- Identifies the source of a log message.message
- The log messagepublic static void debug(String message)
message
- The log messagepublic static void warn(String tag, String message)
tag
- Identifies the source of a log message.message
- The log messagepublic static void warn(String message)
message
- The log messagepublic static void warn(String tag, WZError warning)
warning
- An instance of the WZError
classpublic static void warn(WZError warning)
warning
- An instance of the WZError
classpublic static void error(String tag, String message)
tag
- Identifies the source of a log message.message
- The log messagepublic static void error(String tag, String message, Throwable throwable)
tag
- Identifies the source of a log message.message
- The log messagethrowable
- An exception to logpublic static void error(String message)
message
- The log messagepublic static void error(String tag, WZError error)
tag
- Identifies the source of a log message.error
- An instance of the WZError
classpublic static void error(String tag, WZError error, Throwable throwable)
tag
- Identifies the source of a log message.error
- An instance of the WZError
classthrowable
- An exception to logpublic static void error(WZError error, Throwable throwable)
error
- An instance of the WZError
classthrowable
- An exception to logpublic static void error(WZError error)
error
- An instance of the WZError
classpublic static void error(String tag, Throwable throwable)
tag
- Identifies the source of a log message.throwable
- An exception to logpublic static void error(Throwable throwable)
throwable
- An exception to log© 2016 Wowza Media Systems, LLC. All rights reserved. Terms | Privacy | Trademarks | Legal