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
If logger with specific name was created prior to call spdlog_setup::from_file_with_tag_replacement and logger with the same name encountered in the toml file - the spdlog library will throw the exception throw spdlog_ex("logger with name '" + logger_name + "' already exists"); when trying to create logger as a result whole initialization fails.
Probably better approach would be before trying to create logger with const auto logger = make_shared<spdlog::logger>( name, logger_sinks.cbegin(), logger_sinks.cend());
to query spdlog and if logger exists just replace the sinks using logger::sinks() api
The text was updated successfully, but these errors were encountered:
Hi apologies for the late response and thanks for the feedback.
Since it is subjective and better for some people to throw exception when this happens, it is more likely for me to consider putting some sort of flag to override and follow what you have suggested, to prevent accidental mistake in overriding, while allow users to override if needed to.
If logger with specific name was created prior to call spdlog_setup::from_file_with_tag_replacement and logger with the same name encountered in the toml file - the spdlog library will throw the exception
throw spdlog_ex("logger with name '" + logger_name + "' already exists");
when trying to create logger as a result whole initialization fails.Probably better approach would be before trying to create logger with
const auto logger = make_shared<spdlog::logger>( name, logger_sinks.cbegin(), logger_sinks.cend());
to query spdlog and if logger exists just replace the sinks using logger::sinks() api
The text was updated successfully, but these errors were encountered: