org.zeroturnaround.exec.stream
Class CallerLoggerUtil

java.lang.Object
  extended by org.zeroturnaround.exec.stream.CallerLoggerUtil

public abstract class CallerLoggerUtil
extends Object

Constructs name for the caller logger.

Author:
Rein Raudjärv

Constructor Summary
CallerLoggerUtil()
           
 
Method Summary
static String getName(String name)
          Returns full name for the caller class' logger.
static String getName(String name, int level)
          Returns full name for the caller class' logger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallerLoggerUtil

public CallerLoggerUtil()
Method Detail

getName

public static String getName(String name)
Returns full name for the caller class' logger.

Parameters:
name - name of the logger. In case of full name (it contains dots) same value is just returned. In case of short names (no dots) the given name is prefixed by caller's class name and a dot. In case of null the caller's class name is just returned.
Returns:
full name for the caller class' logger.

getName

public static String getName(String name,
                             int level)
Returns full name for the caller class' logger.

Parameters:
name - name of the logger. In case of full name (it contains dots) same value is just returned. In case of short names (no dots) the given name is prefixed by caller's class name and a dot. In case of null the caller's class name is just returned.
level - no of call stack levels to get the caller (0 means the caller of this method).
Returns:
full name for the caller class' logger.


Copyright © 2015 ZeroTurnaround. All rights reserved.