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

added accessor method for Logger name #345

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

usefulcat
Copy link
Contributor

This is pretty minor but it would be useful for me. My use case is that I've implemented log level inheritance as a function of logger names, like log4cxx and (I think) log4j have. E.g., if you set the log level for logger "foo", then all loggers named "foo.xyz" for any xyz will automatically use the same log level as logger "foo".

If I had to, I could keep track of the logger names myself, via e.g. map<quill::Logger*, std::string> but since the Logger already has its name this seemed reasonable and obviously much more ergonomic for my case.

I considered adding accessors for some of the other things in LoggerDetails, but decided against it since I don't currently have any need for them.

@odygrd
Copy link
Owner

odygrd commented Oct 31, 2023

thanks for the PR, yeah that is fine we can add it

@odygrd odygrd merged commit 224ccb1 into odygrd:master Oct 31, 2023
25 checks passed
@usefulcat usefulcat deleted the logger-name-accessor branch December 2, 2023 20:49
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.

None yet

2 participants