def format(self, record):
        """Return a log record as pyl formated data."""
        ### serialize exception info if needed

        ## retrieve
        exc_info = record.exc_info

        ## serialize if not None

        if exc_info is not None:

            ### turn all the data into a list of strings
            ### representing exception information,
            ### concatenate them into a single text;
            ###
            ### such text represent the exact text that
            ### would be printed by traceback.print_exc

            exc_info = "".join(
                format_exception(
                    ### here exc_info is
                    ### exploded into its
                    ### individual pieces:
                    ### (
                    ###   exc_type,
                    ###   exc_value,
                    ###   exc_traceback,
                    ### )
                    *exc_info
                )
            )

        ### put the record data together in a dict and
        ### return it as a pretty-formatted string with
        ### a trailing comma

        ## XXX perhaps using a f-string with formatting
        ## for datetime.now() would be faster (check and
        ## implement if confirmed)

        return (
            pformat(
                {
                    "name": record.name,
                    "func_name": record.funcName,
                    "timestamp": str(datetime.now()),
                    "level": record.levelname,
                    "message": record.msg,
                    "exc_info": exc_info,
                    "lineno": record.lineno,
                },
                indent=2,
                width=300,
            )
            + ","
        )
Return a log record as pyl formated data.
nodezator/logman/main.py