code: async def emit(self, record: LogRecord):  # type: ignore
          
          if self.writer is None:
              self.writer = await self._init_writer()
  
          try:
              msg = self.format(record) + self.terminator
  
              self.writer.write(msg.encode())
              await self.writer.drain()
          except Exception:
              await self.handleError(record)
docs: Actually log the specified logging record to the stream.