Skip to content

Keep log level filtering when the prefix uses brackets - #18

Open
Hashim1999164 wants to merge 1 commit into
hashicorp:masterfrom
Hashim1999164:fix/levelfilter-prefix-brackets
Open

Keep log level filtering when the prefix uses brackets#18
Hashim1999164 wants to merge 1 commit into
hashicorp:masterfrom
Hashim1999164:fix/levelfilter-prefix-brackets

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Aug 13, 2026

Copy link
Copy Markdown

LevelFilter currently treats the first bracketed token as the level. A log prefix that also uses brackets is then treated as a level name and filtering stops working.

Scan later bracketed tokens and only treat a token as a level when it matches a configured level.

Fixes #8

@Hashim1999164
Hashim1999164 requested a review from a team as a code owner August 13, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant