FIX: set wx log level from app config

Change-Id: Ic75c3eb8fd922cbea2de2b94bd9b210e020baf19
Jira: none
This commit is contained in:
chunmao.guo 2024-05-22 15:14:38 +08:00 committed by Lane.Wei
parent ddbecb4f5e
commit cddb32b9e9
1 changed files with 3 additions and 0 deletions

View File

@ -197,6 +197,9 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_
//reset log level
auto loglevel = wxGetApp().app_config->get("severity_level");
Slic3r::set_logging_level(Slic3r::level_string_to_boost(loglevel));
std::map<std::string, int> wx_log_levels{{"fatal", wxLOG_FatalError}, {"error", wxLOG_FatalError}, {"warning", wxLOG_Warning},
{"info", wxLOG_Info}, {"debug", wxLOG_Debug}, {"trace", wxLOG_Trace}};
wxLog::SetLogLevel(wx_log_levels[loglevel]);
// BBS
m_recent_projects.SetMenuPathStyle(wxFH_PATH_SHOW_ALWAYS);