public class ThreadLogUtil
extends java.lang.Object
Prints thread information and lock-specific info.
Modifier and Type | Field and Description |
---|---|
static boolean |
ENABLED_INFO
Enable info logging.
|
static boolean |
ENABLED_TRACE
Enable trace logging.
|
static int |
info
Set info log level.
|
static int |
trace
Set trace log level.
|
Constructor and Description |
---|
ThreadLogUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
info(java.lang.String text,
java.lang.Object... objects)
If enabled, logs for info level the given objects and text
|
static void |
trace(java.lang.String text,
java.lang.Object... objects)
If enabled, logs for trace level the given objects and text
|
static void |
traceLock(java.lang.String lockAction,
java.util.concurrent.locks.ReentrantLock lock)
Logs the lock and action.
|
static void |
traceLock(java.lang.String lockAction,
java.util.concurrent.locks.ReentrantReadWriteLock lock)
Logs the lock and action.
|
public static int trace
public static int info
public static final boolean ENABLED_TRACE
public static final boolean ENABLED_INFO
public static void trace(java.lang.String text, java.lang.Object... objects)
text
- to logobjects
- to writepublic static void info(java.lang.String text, java.lang.Object... objects)
text
- to logobjects
- to writepublic static void traceLock(java.lang.String lockAction, java.util.concurrent.locks.ReentrantLock lock)
lockAction
- is the action towards the locklock
- is the lock instancepublic static void traceLock(java.lang.String lockAction, java.util.concurrent.locks.ReentrantReadWriteLock lock)
lockAction
- is the action towards the locklock
- is the lock instance