Skip to content
This repository was archived by the owner on Dec 21, 2024. It is now read-only.
This repository was archived by the owner on Dec 21, 2024. It is now read-only.

Fix regex for string template style #194

Description

@Thomasillo

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}'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions