def format(self, record) -> str:
msg = dict(self.formatter_fields_for_record(record))<EOL>if record.flatten and isinstance(record.msg, dict):<EOL><INDENT>msg.update(record.msg)<EOL><DEDENT>else:<EOL><INDENT>msg[MSG_FIELDNAME] = record.msg<EOL><DEDENT>if record.extra:<EOL><INDENT>msg.update(record.extra)<EOL><DEDENT>if record.exc_info:<EOL><INDENT>msg["<STR_LIT>"] = record.exc_info<EOL><DEDENT>if record.exc_text:<EOL><INDENT>msg["<STR_LIT>"] = record.exc_text<EOL><DEDENT>return self.serializer(<EOL>msg, default=self._default_handler, **record.serializer_kwargs<EOL>)<EOL>
:type record: aiologger.loggers.json.LogRecord