processors.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:structlog-pretty 作者: underyx 项目源码 文件源码
def __init__(self, field_map):
        """Create a processor that syntax highlights code in the event values

        The syntax highlighting will use with ANSI terminal color codes.

        :param field_map: A mapping with field names mapped to languages, e.g.
                          ``{'body': 'json': 'soap_response': 'xml'}``
        """
        self.lexers = {
            field: get_lexer_by_name(language)
            for field, language in field_map.items()
        }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号