Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow string input for setLogLevel #136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AuHau
Copy link
Member

@AuHau AuHau commented Jun 16, 2023

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
Copy link
Member

arnetheduck commented Nov 29, 2023

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?

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