You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when trying to access the first pointer(myLogger) from registry using get("myLogger") method, it returns nullptr.
auto myLogger = spdlog::get("myLogger");
This is undesirable, as I registered myLogger into the registry. But changing the default logger not only changed the default logger but also deleted it from the registry map loggers_ .
I tried to track the issue, and I found that while setting another default logger, the entry for the previous logger is erased from the registry map loggers_.
I agree. Seems undesirable.Maybe the fix would be just set the default_logger_ without touching the loggers_ at all. I can’t recall though why it was implemented like this.
Steps to produce
spdlog::set_default_logger(myLogger);
This is undesirable, as I registered myLogger into the registry. But changing the default logger not only changed the default logger but also deleted it from the registry map loggers_ .
I tried to track the issue, and I found that while setting another default logger, the entry for the previous logger is erased from the registry map loggers_.
[File] : registry-inl.h
[Function] :
Inside the first if block, the entry is being erased.
The text was updated successfully, but these errors were encountered: