adjust log level to avoid large log files

This commit is contained in:
SoftFever
2026-05-11 22:39:18 +08:00
parent 527ccbd9ba
commit 2c259307a5

View File

@@ -114,12 +114,13 @@ void set_logging_level(unsigned int level)
{ {
logSeverity = level_to_boost(level); logSeverity = level_to_boost(level);
// Force at debug level logging for pre-release builds. // Orca: force at info or lower level logging for pre-release builds.
// Note: not setting to debug or trace as they might affect long time usage especially with BBL printers.
const std::string version = SoftFever_VERSION; const std::string version = SoftFever_VERSION;
if (boost::algorithm::icontains(version, "dev") || if (level > (unsigned int) boost::log::trivial::info &&
boost::algorithm::icontains(version, "alpha") || (boost::algorithm::icontains(version, "dev") || boost::algorithm::icontains(version, "alpha") ||
boost::algorithm::icontains(version, "beta")) { boost::algorithm::icontains(version, "beta"))) {
logSeverity = boost::log::trivial::debug; logSeverity = boost::log::trivial::info;
} }
boost::log::core::get()->set_filter boost::log::core::get()->set_filter