hashicorp / hashicorp/logutils

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

Open
#8 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
371
Forks
35
PR merge metrics
No merged PRs in 30d

Description

```
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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.