code: async def _log(  # type: ignore
          self,
          level: int,
          msg: Any,
          args: Tuple,
          exc_info=None,
          extra: Dict = None,
          stack_info=False,
          flatten: bool = False,
          serializer_kwargs: Dict = None,
          caller: _Caller = None,
      ):
          
          sinfo = None
          if caller:
              fn, lno, func, sinfo = caller
          else:  # pragma: no cover
              fn, lno, func = "(unknown file)", 0, "(unknown function)"
          if exc_info and isinstance(exc_info, BaseException):
              exc_info = (type(exc_info), exc_info, exc_info.__traceback__)
  
          joined_extra = {}
          joined_extra.update(self.extra)
  
          if extra:
              joined_extra.update(extra)
  
          record = LogRecord(
              name=self.name,
              level=level,
              pathname=fn,
              lineno=lno,
              msg=msg,
              args=args,
              exc_info=exc_info,
              func=func,
              sinfo=sinfo,
              extra=joined_extra,
              flatten=flatten or self.flatten,
              serializer_kwargs=serializer_kwargs or self.serializer_kwargs,
          )
          await self.handle(record)
docs: Low-level logging routine which creates a LogRecord and then calls
          all the handlers of this logger to handle the record.
  
          Overwritten to properly handle log methods kwargs