Skip to content

If log.SetPrefix() contains square brackets it breaks filtering. #8

@TheMightyGit

Description

@TheMightyGit
log.SetPrefix("[ this will break your filtering ]")

My existing code added some extra data using SetPrefix which included square brackets. When I added logutils I noticed that it was not filtering out any log messages (I got them all regardless of their level). I changed from square to normal brackets in my SetPrefix call and it fixed it.

I don't know if you need to fix this in logutils as such, but it may be worth noting it in the docs to help others avoid having this enigmatic problem.

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