FIX: [STUDIO-2846] redirect wxLog to Boost Log

Change-Id: Idb95e9095c857eee37d809079bab08903f336bb9
This commit is contained in:
chunmao.guo 2023-05-16 17:53:07 +08:00 committed by Lane.Wei
parent d0905486ff
commit 0699ee2da3
1 changed files with 10 additions and 0 deletions

View File

@ -2228,8 +2228,18 @@ bool GUI_App::OnInit()
}
}
class wxBoostLog : public wxLog
{
void DoLogText(const wxString &msg) {
BOOST_LOG_TRIVIAL(warning) << msg.ToUTF8().data();
}
};
bool GUI_App::on_init_inner()
{
wxLog::SetActiveTarget(new wxBoostLog());
// Set initialization of image handlers before any UI actions - See GH issue #7469
wxInitAllImageHandlers();
#ifdef NDEBUG