mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-14 09:02:06 +00:00
improve log
This commit is contained in:
@@ -299,7 +299,7 @@ void AppConfig::set_defaults()
|
||||
set_bool("enable_ssl_for_ftp", true);
|
||||
|
||||
if (get("log_severity_level").empty())
|
||||
set("log_severity_level", "warning");
|
||||
set("log_severity_level", "info");
|
||||
|
||||
if (get("internal_developer_mode").empty())
|
||||
set_bool("internal_developer_mode", false);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -5807,12 +5807,16 @@ bool GUI_App::maybe_migrate_user_presets_on_login()
|
||||
{
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << "Migrate user presets to the OrcaCloud user folder if needed.";
|
||||
|
||||
if (!m_agent || !m_agent->is_user_login())
|
||||
return false;
|
||||
|
||||
std::string new_user_id = m_agent->get_user_id();
|
||||
if (new_user_id.empty())
|
||||
if (new_user_id.empty()) {
|
||||
BOOST_LOG_TRIVIAL(warning) << "Failed to get user ID, skipping migration.";
|
||||
return false;
|
||||
}
|
||||
|
||||
fs::path user_base = fs::path(data_dir()) / PRESET_USER_DIR;
|
||||
fs::path target_dir = user_base / new_user_id;
|
||||
|
||||
Reference in New Issue
Block a user