def format(self, record):
out = dict(<EOL>Timestamp=int(record.created * <NUM_LIT>),<EOL>Type=record.name,<EOL>Logger=self.logger_name,<EOL>Hostname=self.hostname,<EOL>EnvVersion=self.LOGGING_FORMAT_VERSION,<EOL>Severity=self.SYSLOG_LEVEL_MAP.get(record.levelno,<EOL>self.DEFAULT_SYSLOG_LEVEL),<EOL>Pid=record.process,<EOL>)<EOL>fields = dict()<EOL>for key, value in record.__dict__.items():<EOL><INDENT>if key not in self.EXCLUDED_LOGRECORD_ATTRS:<EOL><INDENT>fields[key] = value<EOL><DEDENT><DEDENT>message = record.getMessage()<EOL>if message:<EOL><INDENT>if not message.startswith("<STR_LIT:{>") and not message.endswith("<STR_LIT:}>"):<EOL><INDENT>fields["<STR_LIT>"] = message<EOL><DEDENT><DEDENT>if record.exc_info is not None:<EOL><INDENT>fields["<STR_LIT:error>"] = repr(record.exc_info[<NUM_LIT:1>])<EOL>fields["<STR_LIT>"] = safer_format_traceback(*record.exc_info)<EOL><DEDENT>out['<STR_LIT>'] = fields<EOL>return json.dumps(out)<EOL>
Map from Python LogRecord attributes to JSON log format fields

* from - https://docs.python.org/3/library/logging.html#logrecord-attributes
* to - https://mana.mozilla.org/wiki/pages/viewpage.action?pageId=42895640