Fixed various warnings

This commit is contained in:
emeric
2025-12-02 23:05:09 +01:00
parent d843cf5c06
commit 954b873f2b
+10 -11
View File
@@ -144,33 +144,33 @@ namespace lms::core::logging
{ {
case core::logging::Severity::DEBUG: case core::logging::Severity::DEBUG:
if (_logFileStream) if (_logFileStream)
addOutputStream(*_logFileStream, { core::logging::Severity::DEBUG }); addOutputStream(*_logFileStream, core::logging::Severity::DEBUG);
else else
addOutputStream(std::cout, { core::logging::Severity::DEBUG }); addOutputStream(std::cout, core::logging::Severity::DEBUG);
[[fallthrough]]; [[fallthrough]];
case core::logging::Severity::INFO: case core::logging::Severity::INFO:
if (_logFileStream) if (_logFileStream)
addOutputStream(*_logFileStream, { core::logging::Severity::INFO }); addOutputStream(*_logFileStream, core::logging::Severity::INFO);
else else
addOutputStream(std::cout, { core::logging::Severity::INFO }); addOutputStream(std::cout, core::logging::Severity::INFO);
[[fallthrough]]; [[fallthrough]];
case core::logging::Severity::WARNING: case core::logging::Severity::WARNING:
if (_logFileStream) if (_logFileStream)
addOutputStream(*_logFileStream, { core::logging::Severity::WARNING }); addOutputStream(*_logFileStream, core::logging::Severity::WARNING);
else else
addOutputStream(std::cerr, { core::logging::Severity::WARNING }); addOutputStream(std::cerr, core::logging::Severity::WARNING);
[[fallthrough]]; [[fallthrough]];
case core::logging::Severity::ERROR: case core::logging::Severity::ERROR:
if (_logFileStream) if (_logFileStream)
addOutputStream(*_logFileStream, { core::logging::Severity::ERROR }); addOutputStream(*_logFileStream, core::logging::Severity::ERROR);
else else
addOutputStream(std::cerr, { core::logging::Severity::ERROR }); addOutputStream(std::cerr, core::logging::Severity::ERROR);
[[fallthrough]]; [[fallthrough]];
case core::logging::Severity::FATAL: case core::logging::Severity::FATAL:
if (_logFileStream) if (_logFileStream)
addOutputStream(*_logFileStream, { core::logging::Severity::FATAL }); addOutputStream(*_logFileStream, core::logging::Severity::FATAL);
else else
addOutputStream(std::cerr, { core::logging::Severity::FATAL }); addOutputStream(std::cerr, core::logging::Severity::FATAL);
break; break;
} }
} }
@@ -206,5 +206,4 @@ namespace lms::core::logging
std::unique_lock lock{ outputStream->mutex }; std::unique_lock lock{ outputStream->mutex };
outputStream->stream << stringUtils::toISO8601String(now) << " " << std::this_thread::get_id() << " [" << getSeverityName(severity) << "] [" << getModuleName(module) << "] " << message << std::endl; outputStream->stream << stringUtils::toISO8601String(now) << " " << std::this_thread::get_id() << " [" << getSeverityName(severity) << "] [" << getModuleName(module) << "] " << message << std::endl;
} }
} // namespace lms::core::logging } // namespace lms::core::logging