com.gc.iotools.stream.utils
Class LogUtils

java.lang.Object
  extended by com.gc.iotools.stream.utils.LogUtils

public final class LogUtils
extends Object

Utilities for logging.

Since:
1.0.9
Version:
$Id: LogUtils.java 463 2011-01-21 23:54:17Z dvd.smnt@gmail.com $
Author:
dvd.smnt

Method Summary
static String getCaller(Class<?> clazz)
          Returns the caller of the class passed as an argument.
static String getCaller(Class<?> me, int nframes)
          Returns the caller stack of the class passed as an argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCaller

public static String getCaller(Class<?> clazz)
Returns the caller of the class passed as an argument. Useful for logging.

Parameters:
clazz - The current class
Returns:
The class name up one level in the stack.

getCaller

public static String getCaller(Class<?> me,
                               int nframes)
Returns the caller stack of the class passed as an argument. Useful for logging.

Parameters:
nframes - Number of stack frames to log out.
me - The current class
Returns:
All the class names, methods and line numbers up nframes level in the stack.
Since:
1.2.6


Copyright © 2008-2011. All Rights Reserved.