improve log

This commit is contained in:
SoftFever
2026-05-09 02:35:50 +08:00
parent e5294b1282
commit cb033455fa
3 changed files with 14 additions and 2 deletions

View File

@@ -114,6 +114,14 @@ void set_logging_level(unsigned int level)
{
logSeverity = level_to_boost(level);
// Force at debug level logging for pre-release builds.
const std::string version = SoftFever_VERSION;
if (boost::algorithm::icontains(version, "dev") ||
boost::algorithm::icontains(version, "alpha") ||
boost::algorithm::icontains(version, "beta")) {
logSeverity = boost::log::trivial::debug;
}
boost::log::core::get()->set_filter
(
boost::log::trivial::severity >= logSeverity