async def emit(self, record: LogRecord):  
if self.writer is None:<EOL><INDENT>self.writer = await self._init_writer()<EOL><DEDENT>try:<EOL><INDENT>msg = self.format(record) + self.terminator<EOL>self.writer.write(msg.encode())<EOL>await self.writer.drain()<EOL><DEDENT>except Exception:<EOL><INDENT>await self.handleError(record)<EOL><DEDENT>
Actually log the specified logging record to the stream.