File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 66#ifndef OCVSMD_COMMON_LOGGING_HPP_INCLUDED
77#define OCVSMD_COMMON_LOGGING_HPP_INCLUDED
88
9+ #include " common_helpers.hpp"
10+
911#include < spdlog/logger.h>
1012#include < spdlog/spdlog.h>
1113
@@ -20,7 +22,7 @@ namespace common
2022using Logger = spdlog::logger;
2123using LoggerPtr = std::shared_ptr<Logger>;
2224
23- inline LoggerPtr getLogger (const std::string& name)
25+ inline LoggerPtr getLogger (const std::string& name) noexcept
2426{
2527 if (auto logger = spdlog::get (name))
2628 {
@@ -34,7 +36,11 @@ inline LoggerPtr getLogger(const std::string& name)
3436 CETL_DEBUG_ASSERT (logger, name.c_str ());
3537
3638 apply_logger_env_levels (logger);
37- register_logger (logger);
39+
40+ performWithoutThrowing ([&logger] {
41+ //
42+ register_logger (logger);
43+ });
3844
3945 return logger;
4046}
You can’t perform that action at this time.
0 commit comments