Class CallerLoggerUtil


  • public abstract class CallerLoggerUtil
    extends java.lang.Object
    Constructs name for the caller logger.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.lang.String getCallerClassName​(int level)  
      static java.lang.String getName​(java.lang.String name)
      Returns full name for the caller class' logger.
      static java.lang.String getName​(java.lang.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 java.lang.String getName​(java.lang.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 java.lang.String getName​(java.lang.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.
      • getCallerClassName

        private static java.lang.String getCallerClassName​(int level)
        Returns:
        caller class name of the given level.