code: def error(self, message, *args, **kwargs):
          
          kwargs.setdefault('extra', {}).setdefault('stack', True)
          return self.logger.error(message, *args, **kwargs)
docs: Log error with stack trace and locals information.
  
          By default, enables stack trace information in logging messages, so that stacktrace and locals appear in Sentry.