code: private boolean detectLogFromBugsnag(Throwable throwable) {
          // Check all places that LOGGER is called with an exception in the Bugsnag library
          for (StackTraceElement element : throwable.getStackTrace()) {
              for (String excludedClass : EXCLUDED_CLASSES) {
                  if (element.getClassName().startsWith(excludedClass)) {
                      return true;
                  }
              }
          }
  
          return false;
      }
docs: Checks to see if a stack trace came from the Bugsnag library
  (prevent possible infinite reporting loops)
  
  @param throwable the exception to check
  @return true if the stacktrace contains a frame from the Bugsnag library