code: public static Class<?> getLoggingClass(Object object) {
          Class<?> result = object.getClass();
          if (result.getSimpleName().matches(".*[$].*CGLIB.*")) {
              result = result.getSuperclass();
          }
          return result;
      }
docs: Returns the class that can be used to derive the logger name from.
  For CGLIB advised classes this is the super class of the object class.
  @param object The object to query
  @return The logging class of the object