code: protected static String detectClass(int i) {
          if (i < 1) {
              throw new IllegalArgumentException("Expected value > 0, got " + i);
          }
          StackTraceElement[] stack = Thread.currentThread().getStackTrace();
          // 0 getStackTrace
          // 1 detectClass
          // 2 getLogger
          // 3 caller
          if (stack.length <= i+2) return "";
          return stack[i+2].getClassName();
      }
docs: {@code i == 0} identifies the caller of this method, for {@code i > 0},
  the stack is walked upwards.
  @param i
  @return class name