com.espertech.esper.util
Class ThreadLogUtil

java.lang.Object
  extended by com.espertech.esper.util.ThreadLogUtil

public class ThreadLogUtil
extends java.lang.Object

Utility class for logging threading-related messages.

Prints thread information and lock-specific info.


Field Summary
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 Summary
ThreadLogUtil()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRACE

public static int TRACE
Set trace log level.


INFO

public static int INFO
Set info log level.


ENABLED_TRACE

public static final boolean ENABLED_TRACE
Enable trace logging.

See Also:
Constant Field Values

ENABLED_INFO

public static final boolean ENABLED_INFO
Enable info logging.

See Also:
Constant Field Values
Constructor Detail

ThreadLogUtil

public ThreadLogUtil()
Method Detail

trace

public static void trace(java.lang.String text,
                         java.lang.Object... objects)
If enabled, logs for trace level the given objects and text

Parameters:
text - to log
objects - to write

info

public static void info(java.lang.String text,
                        java.lang.Object... objects)
If enabled, logs for info level the given objects and text

Parameters:
text - to log
objects - to write

traceLock

public static void traceLock(java.lang.String lockAction,
                             java.util.concurrent.locks.ReentrantLock lock)
Logs the lock and action.

Parameters:
lockAction - is the action towards the lock
lock - is the lock instance

traceLock

public static void traceLock(java.lang.String lockAction,
                             java.util.concurrent.locks.ReentrantReadWriteLock lock)
Logs the lock and action.

Parameters:
lockAction - is the action towards the lock
lock - is the lock instance

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com