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()
}
评论列表
文章目录