-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
set_level not setting _level #105
Comments
If I recall correctly, On Sun, May 31, 2015 at 2:38 AM, gedrite notifications@github.com wrote:
Kapp Arnaud - Xaqq |
I chose your option #1, setting the level on my logger object. It now works as expected. Thanks xaqq! |
spdlog:set_level can be called before creation actually. I think the problem is that this logger was not regisered. A call to register_logger before the call would fix this too.. |
Hi all, i have the same problem but the workaround didn't work for me |
Great and fast library.
I am using a custom sink though I do not think this matters.
Problem: After creating a logger, I use spdlog::set_level(spdlog::level::trace); but my trace and debug level logs do not log. I found that if I comment line 43 in logger_impl.h that my trace and debug logs are logged. Line 43 is currently the line _level = level::info; in logger function:
template
inline spdlog::logger::logger(const std::string& logger_name, const It& begin, const It& end) :
_name(logger_name),
_sinks(begin, end),
_formatter(std::make_shared<pattern_formatter>("%+"))
{
}
I'm using clang in QtCreator on Mac OS X Yosemity, logging to a QTextEdit from a logger created at global namespace.
Please let me know if you think I've failed to do something to setup my logging and/or if commenting that line is ok or bad.
Thanks!
The text was updated successfully, but these errors were encountered: