Skip to content

feat: allow string input for setLogLevel#136

Open
AuHau wants to merge 1 commit into
masterfrom
feat/allow-string-setloglevel
Open

feat: allow string input for setLogLevel#136
AuHau wants to merge 1 commit into
masterfrom
feat/allow-string-setloglevel

Conversation

@AuHau

@AuHau AuHau commented Jun 16, 2023

Copy link
Copy Markdown

If you use parseTopicDirectives then it allows to use log levels as strings which can be lowercased or even shortened. But if you want to set top-level logging level then you have to use the parseEnum utility which is IMHO bad API, so I want to introduce another override for setLogLevel which allows to take string in any casing.

@arnetheduck

arnetheduck commented Nov 29, 2023

Copy link
Copy Markdown
Member

Sounds reasonable, but instead of a setLogLevel overload, it feels like it's the log level parser that should be exposed (ie proc parse(_: type LogLevel, v: openArray[char]): LogLevel or something like that) - wdyt?

@arnetheduck

Copy link
Copy Markdown
Member

ping @AuHau

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.

2 participants