private  static String getCallerInfo() {

      String callerInfo = "DefaultName-callerUnknown";
      // use class name instead of filename since filename is null for Sun/Java
      // classes when running in a JRE-only context
      String thisClassName = "log.Log";
      Thread thread = Thread.currentThread();
      StackTraceElement[] framesArray = thread.getStackTrace();

      // look for the last stack frame from this class and then whatever is next
      // is the caller we want to know about
      for (StackTraceElement stackFrame : framesArray) {

         // filter out Thread because we just created a couple frames using
         // Thread
         if (!stackFrame.getClassName().equals("java.lang.Thread")
             && !stackFrame.getClassName().equals(thisClassName)) {

            // handle case for file name when debug info is missing from
            // classfile
            String fileName = stackFrame.getFileName() != null ? stackFrame.getFileName()
                                                              : "Unknown";
            StringBuilder sb = new StringBuilder(stackFrame.getMethodName());
            sb.append('(');
            sb.append(fileName);
            sb.append(':');
            // if no debug info, returns a negative number
            sb.append(stackFrame.getLineNumber());
            sb.append(')');
            callerInfo = sb.toString();
            break;
         }
      }
      return callerInfo;
   }