python-json-logger
python-json-logger copied to clipboard
Fix regex for string template style
valid String template: '$asctime $level $message'
regex for string template in JsonFormatter.parse:
....
elif isinstance(self._style, logging.StrFormatStyle):
formatter_style_pattern = re.compile(r"\{(.+?)\}", re.IGNORECASE)
...
would require the string template to be
'${asctime} ${level} ${message}'
Hi @Thomasillo,
Just so you're aware it looks like python-json-logger is currently unmaintained, that said I am working on a maintained fork where I've opened a copy of this issue.