Skip to content

feat: replace invisible control characters in keys with "_" #21

@spaceone

Description

@spaceone

Control chars in keys are currently completely removed.

That causes that foo\x12bar appears equally to foobar in the logline.
A log reader (developer) also doesn't recognize that something "wrong" or "broken" or "dangerous" has been tried to log.

Therefor I would propose to replace these control chars with _ (or the unicode equivalent escape sequence, but that looks dirty).
The case when this happens in real world is probably under 0.9%.

Python-logfmter would like to have a equal behavior than this project: josheppinette/python-logfmter#54

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions