code: private boolean shouldBeLogged(Throwable t, OSGiTraceComponent tc, ExtendedLogEntry logEntry) {
          while (t != null) {
              if (t instanceof IllegalStateException && COULD_NOT_OBTAIN_LOCK_EXCEPTION.equals(t.getMessage())) {
                  if (tc.isDebugEnabled()) {
                      Tr.debug(tc, "DS could not obtain a lock. This is not an error, but may indicate high system load",
                              getObjects(logEntry, false));
                  }
                  return false;
              }
              t = t.getCause();
          }
          return true;
      }
docs: /*
  Check to see if this exception should be squelched.