code: def validate_instance(instance):
      
      excludes = settings.AUTOMATED_LOGGING['exclude']['model']
  
      for excluded in excludes:
          if (excluded in [instance._meta.app_label.lower(),
                           instance.__class__.__name__.lower()] or
                  instance.__module__.lower().startswith(excluded)):
              return False
  
      return True
docs: Validating if the instance should be logged, or is excluded