public class UniLogger
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEBUG |
static int |
DUMP |
static int |
ERROR |
static int |
INFO |
static int |
INTER |
static int |
IO |
static int |
L1 |
static int |
L2 |
static int |
L3 |
static int |
L4 |
static int |
WARN |
| Constructor and Description |
|---|
UniLogger()
Constructor for the UniLogger class.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
d(java.lang.String tag,
java.lang.String msg)
Logs a debug message with the specified tag and message.
|
static void |
d(java.lang.String tag,
java.lang.String format,
java.lang.Object... args)
Logs a debug message with the specified tag and format.
|
static void |
e(java.lang.String tag,
java.lang.String msg)
Logs an error message with the specified tag and message.
|
static void |
e(java.lang.String tag,
java.lang.String format,
java.lang.Object... args)
Logs an error message with the specified tag and format.
|
static void |
e(java.lang.String tag,
java.lang.Throwable tr,
java.lang.String format,
java.lang.Object... args)
Logs an error message with the specified tag, throwable and format.
|
static int |
getLogLevel()
Gets the log level.
|
static void |
i(java.lang.String tag,
int level,
java.lang.String msg)
Logs an info message with the specified tag, level, and message.
|
static void |
i(java.lang.String tag,
int level,
java.lang.String format,
java.lang.Object... args)
Logs an info message with the specified tag, level, and format.
|
static void |
i(java.lang.String tag,
java.lang.String format,
java.lang.Object... args)
Logs an info message with the specified tag and format.
|
static boolean |
isLogging(int level)
Checks if logging is enabled for the specified level.
|
static void |
popListener()
Pops a listener from the stack of listeners.
|
static void |
pushListener(com.unitech.lib.util.diagnotics.UniLogger.ILoggingCheckPermissionListener listener)
Pushes a listener to the stack of listeners.
|
static void |
setLogLevel(int level)
Sets the log level.
|
static void |
shutdown()
Shuts down the logger.
|
static void |
startUp(int level,
java.lang.String path,
java.lang.String name)
Starts up the logger with the specified level, path, and name.
|
static void |
startUp(int level,
java.lang.String path,
java.lang.String name,
com.unitech.lib.util.diagnotics.UniLogger.ILoggingCheckPermissionListener listener)
Starts up the logger with the specified level, path, name, and listener.
|
static void |
startUp(java.lang.String path,
java.lang.String name)
Starts up the logger with the specified path and name.
|
static void |
startUp(java.lang.String path,
java.lang.String name,
com.unitech.lib.util.diagnotics.UniLogger.ILoggingCheckPermissionListener listener)
Starts up the logger with the specified path, name, and listener.
|
static void |
v(java.lang.String tag,
int level,
java.lang.String msg)
Logs a verbose message with the specified tag and level.
|
static void |
v(java.lang.String tag,
int level,
java.lang.String format,
java.lang.Object... args)
Logs a verbose message with the specified tag and level.
|
static void |
w(java.lang.String tag,
java.lang.String msg)
Logs a warning message with the specified tag and message.
|
static void |
w(java.lang.String tag,
java.lang.String format,
java.lang.Object... args)
Logs a warning message with the specified tag and format.
|
public static final int ERROR
public static final int WARN
public static final int DEBUG
public static final int L1
public static final int L2
public static final int L3
public static final int L4
public static final int INFO
public static final int INTER
public static final int IO
public static final int DUMP
public static void startUp(java.lang.String path,
java.lang.String name)
path - The path for the log file.name - The name for the log file.public static void startUp(java.lang.String path,
java.lang.String name,
com.unitech.lib.util.diagnotics.UniLogger.ILoggingCheckPermissionListener listener)
path - The path for the log file.name - The name for the log file.listener - The listener for checking permissions.public static void startUp(int level,
java.lang.String path,
java.lang.String name)
level - The level for the logger.path - The path for the log file.name - The name for the log file.public static void startUp(int level,
java.lang.String path,
java.lang.String name,
com.unitech.lib.util.diagnotics.UniLogger.ILoggingCheckPermissionListener listener)
level - The level for the logger.path - The path for the log file.name - The name for the log file.listener - The listener for checking permissions.public static void shutdown()
public static void pushListener(com.unitech.lib.util.diagnotics.UniLogger.ILoggingCheckPermissionListener listener)
listener - The listener to be pushed.public static void popListener()
public static int getLogLevel()
public static void setLogLevel(int level)
level - The log level to be set.public static boolean isLogging(int level)
level - The level to be checked.public static void v(java.lang.String tag,
int level,
java.lang.String format,
java.lang.Object... args)
tag - The tag for the log message.level - The level for the log message.format - The format for the log message.args - The arguments for the log message.public static void v(java.lang.String tag,
int level,
java.lang.String msg)
tag - The tag for the log message.level - The level for the log message.msg - The message to be logged.public static void d(java.lang.String tag,
java.lang.String msg)
tag - The tag for the log message.msg - The message to be logged.public static void d(java.lang.String tag,
java.lang.String format,
java.lang.Object... args)
tag - The tag for the log message.format - The format for the log message.args - The arguments for the log message.public static void i(java.lang.String tag,
int level,
java.lang.String format,
java.lang.Object... args)
tag - The tag for the log message.level - The level for the log message.format - The format for the log message.args - The arguments for the log message.public static void i(java.lang.String tag,
int level,
java.lang.String msg)
tag - The tag for the log message.level - The level for the log message.msg - The message to be logged.public static void i(java.lang.String tag,
java.lang.String format,
java.lang.Object... args)
tag - The tag for the log message.format - The format for the log message.args - The arguments for the log message.public static void w(java.lang.String tag,
java.lang.String format,
java.lang.Object... args)
tag - The tag for the log message.format - The format for the log message.args - The arguments for the log message.public static void w(java.lang.String tag,
java.lang.String msg)
tag - The tag for the log message.msg - The message to be logged.public static void e(java.lang.String tag,
java.lang.String format,
java.lang.Object... args)
tag - The tag for the log message.format - The format for the log message.args - The arguments for the log message.public static void e(java.lang.String tag,
java.lang.Throwable tr,
java.lang.String format,
java.lang.Object... args)
tag - The tag for the log message.tr - Throwable associated with the error.format - The format for the log message.args - The arguments for the log message.public static void e(java.lang.String tag,
java.lang.String msg)
tag - The tag for the log message.msg - The message to be logged.