mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-08 17:29:03 +08:00
ENH: modify some logs level
JIRA: STUDIO-5958 Change-Id: I5a8592dfb8ffa9a81952535cb30944f867aa0e22 Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
parent
a6bd0f26ed
commit
ee39610e27
@ -4110,8 +4110,7 @@ int MachineObject::parse_json(std::string payload)
|
||||
} else if (jj["command"].get<std::string>() == "project_file") {
|
||||
//ack of project file
|
||||
BOOST_LOG_TRIVIAL(debug) << "parse_json, ack of project_file = " << j.dump(4);
|
||||
|
||||
if (m_agent && is_studio_cmd(sequence_id)) {
|
||||
if (m_agent) {
|
||||
json t;
|
||||
t["dev_id"] = this->dev_id;
|
||||
t["signal"] = this->wifi_signal;
|
||||
|
@ -5846,7 +5846,7 @@ void GUI_App::OSXStoreOpenFiles(const wxArrayString &fileNames)
|
||||
|
||||
void GUI_App::MacOpenURL(const wxString& url)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "get mac url " << url;
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << "get mac url " << url;
|
||||
|
||||
if (!url.empty() && boost::starts_with(url, "bambustudioopen://")) {
|
||||
auto input_str_arr = split_str(url.ToStdString(), "bambustudioopen://");
|
||||
@ -5857,7 +5857,7 @@ void GUI_App::MacOpenURL(const wxString& url)
|
||||
}
|
||||
|
||||
std::string download_file_url = url_decode(download_origin_url);
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << download_file_url;
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << download_file_url;
|
||||
if (!download_file_url.empty() && (boost::starts_with(download_file_url, "http://") || boost::starts_with(download_file_url, "https://"))) {
|
||||
|
||||
if (m_post_initialized) {
|
||||
|
@ -3432,7 +3432,7 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
||||
int progress_percent = static_cast<int>(100.0f * static_cast<float>(i) / static_cast<float>(input_files.size()));
|
||||
const auto real_filename = (strategy & LoadStrategy::Restore) ? input_files[++i].filename() : filename;
|
||||
const auto dlg_info = _L("Loading file") + ": " + from_path(real_filename);
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": load file %1%") % filename;
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << boost::format(": load file %1%") % filename;
|
||||
dlg_cont = dlg.Update(progress_percent, dlg_info);
|
||||
if (!dlg_cont) return empty_result;
|
||||
|
||||
@ -5101,7 +5101,7 @@ void Plater::priv::export_gcode(fs::path output_path, bool output_path_on_remova
|
||||
{
|
||||
wxCHECK_RET(!(output_path.empty()), "export_gcode: output_path and upload_job empty");
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << boost::format("export_gcode: output_path %1%")%output_path.string();
|
||||
BOOST_LOG_TRIVIAL(trace) << boost::format("export_gcode: output_path %1%")%output_path.string();
|
||||
if (model.objects.empty())
|
||||
return;
|
||||
|
||||
@ -7260,7 +7260,7 @@ wxString Plater::priv::get_project_name()
|
||||
//BBS
|
||||
void Plater::priv::set_project_name(const wxString& project_name)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << __LINE__ << " project is:" << project_name;
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << __LINE__ << " project is:" << project_name;
|
||||
m_project_name = project_name;
|
||||
//update topbar title
|
||||
wxGetApp().mainframe->SetTitle(m_project_name);
|
||||
@ -7290,7 +7290,7 @@ void Plater::priv::set_project_filename(const wxString& filename)
|
||||
full_path.replace_extension("");
|
||||
|
||||
m_project_folder = full_path.parent_path();
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << __LINE__ << " project folder is:" << m_project_folder.string();
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << __LINE__ << " project folder is:" << m_project_folder.string();
|
||||
|
||||
//BBS
|
||||
wxString project_name = from_u8(full_path.filename().string());
|
||||
@ -8494,6 +8494,7 @@ void Plater::load_project(wxString const& filename2,
|
||||
wxString const& originfile)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "filename is: " << filename2 << "and originfile is: " << originfile;
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__;
|
||||
auto filename = filename2;
|
||||
auto check = [&filename, this] (bool yes_or_no) {
|
||||
if (!yes_or_no && !wxGetApp().check_and_save_current_preset_changes(_L("Load project"),
|
||||
@ -8635,7 +8636,7 @@ int Plater::save_project(bool saveAs)
|
||||
Slic3r::remove_backup(model(), false);
|
||||
|
||||
p->set_project_filename(filename);
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << __LINE__ << " call set_project_filename: " << filename;
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << __LINE__ << " call set_project_filename: " << filename;
|
||||
|
||||
up_to_date(true, false);
|
||||
up_to_date(true, true);
|
||||
@ -8659,7 +8660,7 @@ int Plater::save_project(bool saveAs)
|
||||
//BBS import model by model id
|
||||
void Plater::import_model_id(wxString download_info)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << __LINE__ << " download info: " << download_info;
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << __LINE__ << " download info: " << download_info;
|
||||
|
||||
wxString download_origin_url = download_info;
|
||||
wxString download_url;
|
||||
@ -9423,7 +9424,8 @@ void Plater::load_gcode()
|
||||
//BBS: remove GCodeViewer as seperate APP logic
|
||||
void Plater::load_gcode(const wxString& filename)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << __LINE__ << " entry and filename: " << filename;
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << __LINE__ << " entry and filename: " << filename;
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__;
|
||||
if (! is_gcode_file(into_u8(filename))
|
||||
|| (m_last_loaded_gcode == filename && m_only_gcode)
|
||||
)
|
||||
@ -11134,9 +11136,12 @@ int Plater::export_3mf(const boost::filesystem::path& output_path, SaveStrategy
|
||||
const std::string path_u8 = into_u8(path);
|
||||
wxBusyCursor wait;
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": path=%1%, backup=%2%, export_plate_idx=%3%, SaveStrategy=%4%")
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << boost::format(": path=%1%, backup=%2%, export_plate_idx=%3%, SaveStrategy=%4%")
|
||||
%output_path.string()%(strategy & SaveStrategy::Backup)%export_plate_idx %(unsigned int)strategy;
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": path=%1%, backup=%2%, export_plate_idx=%3%, SaveStrategy=%4%")
|
||||
% std::string("") % (strategy & SaveStrategy::Backup) % export_plate_idx % (unsigned int)strategy;
|
||||
|
||||
//BBS: add plate logic for thumbnail generate
|
||||
std::vector<ThumbnailData*> thumbnails;
|
||||
std::vector<ThumbnailData*> calibration_thumbnails;
|
||||
@ -11290,7 +11295,7 @@ int Plater::export_3mf(const boost::filesystem::path& output_path, SaveStrategy
|
||||
if (!(store_params.strategy & SaveStrategy::Silence)) {
|
||||
// Success
|
||||
p->set_project_filename(path);
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << __LINE__ << " call set_project_filename: " << path;
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << __LINE__ << " call set_project_filename: " << path;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -191,7 +191,7 @@ GuideFrame::~GuideFrame()
|
||||
|
||||
void GuideFrame::load_url(wxString &url)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__<< " enter, url=" << url.ToStdString();
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__<< " enter, url=" << url.ToStdString();
|
||||
WebView::LoadUrl(m_browser, url);
|
||||
m_browser->SetFocus();
|
||||
UpdateState();
|
||||
@ -552,7 +552,7 @@ void GuideFrame::OnError(wxWebViewEvent &evt)
|
||||
// Show the info bar with an error
|
||||
// m_info->ShowMessage(_L("An error occurred loading ") + evt.GetURL() +
|
||||
// "\n" + "'" + category + "'", wxICON_ERROR);
|
||||
BOOST_LOG_TRIVIAL(info) << "GuideFrame::OnError: An error occurred loading " << evt.GetURL() << category;
|
||||
BOOST_LOG_TRIVIAL(trace) << "GuideFrame::OnError: An error occurred loading " << evt.GetURL() << category;
|
||||
|
||||
UpdateState();
|
||||
}
|
||||
@ -1605,7 +1605,7 @@ bool GuideFrame::LoadFile(std::string jPath, std::string &sContent)
|
||||
std::stringstream buffer;
|
||||
buffer << t.rdbuf();
|
||||
sContent=buffer.str();
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", load %1% into buffer")% jPath;
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << boost::format(", load %1% into buffer")% jPath;
|
||||
}
|
||||
catch (std::exception &e)
|
||||
{
|
||||
|
@ -223,7 +223,7 @@ WebViewPanel::WebViewPanel(wxWindow *parent)
|
||||
|
||||
WebViewPanel::~WebViewPanel()
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " Start";
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << " Start";
|
||||
SetEvtHandlerEnabled(false);
|
||||
|
||||
delete m_tools_menu;
|
||||
@ -233,7 +233,7 @@ WebViewPanel::~WebViewPanel()
|
||||
delete m_LoginUpdateTimer;
|
||||
m_LoginUpdateTimer = NULL;
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " End";
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << " End";
|
||||
}
|
||||
|
||||
|
||||
@ -539,7 +539,7 @@ void WebViewPanel::update_mode()
|
||||
*/
|
||||
void WebViewPanel::OnNavigationRequest(wxWebViewEvent& evt)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": " << evt.GetTarget().ToUTF8().data();
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << ": " << evt.GetTarget().ToUTF8().data();
|
||||
const wxString &url = evt.GetURL();
|
||||
if (url.StartsWith("File://") || url.StartsWith("file://")) {
|
||||
if (!url.Contains("/web/homepage/index.html")) {
|
||||
@ -583,7 +583,7 @@ void WebViewPanel::OnNavigationComplete(wxWebViewEvent& evt)
|
||||
{
|
||||
m_browser->Show();
|
||||
Layout();
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": " << evt.GetTarget().ToUTF8().data();
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << ": " << evt.GetTarget().ToUTF8().data();
|
||||
if (wxGetApp().get_mode() == comDevelop)
|
||||
wxLogMessage("%s", "Navigation complete; url='" + evt.GetURL() + "'");
|
||||
UpdateState();
|
||||
@ -595,7 +595,7 @@ void WebViewPanel::OnNavigationComplete(wxWebViewEvent& evt)
|
||||
*/
|
||||
void WebViewPanel::OnDocumentLoaded(wxWebViewEvent& evt)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": " << evt.GetTarget().ToUTF8().data();
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << ": " << evt.GetTarget().ToUTF8().data();
|
||||
// Only notify if the document is the main frame, not a subframe
|
||||
if (evt.GetURL() == m_browser->GetCurrentURL())
|
||||
{
|
||||
@ -607,7 +607,7 @@ void WebViewPanel::OnDocumentLoaded(wxWebViewEvent& evt)
|
||||
|
||||
void WebViewPanel::OnTitleChanged(wxWebViewEvent &evt)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": " << evt.GetString().ToUTF8().data();
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << ": " << evt.GetString().ToUTF8().data();
|
||||
// wxGetApp().CallAfter([this] { SendRecentList(); });
|
||||
}
|
||||
|
||||
@ -616,7 +616,7 @@ void WebViewPanel::OnTitleChanged(wxWebViewEvent &evt)
|
||||
*/
|
||||
void WebViewPanel::OnNewWindow(wxWebViewEvent& evt)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": " << evt.GetURL().ToUTF8().data();
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << ": " << evt.GetURL().ToUTF8().data();
|
||||
wxString flag = " (other)";
|
||||
|
||||
if (evt.GetNavigationAction() == wxWEBVIEW_NAV_ACTION_USER)
|
||||
@ -637,7 +637,7 @@ void WebViewPanel::OnNewWindow(wxWebViewEvent& evt)
|
||||
|
||||
void WebViewPanel::OnScriptMessage(wxWebViewEvent& evt)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": " << evt.GetString().ToUTF8().data();
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << ": " << evt.GetString().ToUTF8().data();
|
||||
// update login status
|
||||
if (m_LoginUpdateTimer == nullptr) {
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " Create Timer";
|
||||
@ -883,7 +883,7 @@ void WebViewPanel::OnError(wxWebViewEvent& evt)
|
||||
WX_ERROR_CASE(wxWEBVIEW_NAV_ERR_OTHER);
|
||||
}
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": [" << category << "] " << evt.GetString().ToUTF8().data();
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << ": [" << category << "] " << evt.GetString().ToUTF8().data();
|
||||
|
||||
if (wxGetApp().get_mode() == comDevelop)
|
||||
wxLogMessage("%s", "Error; url='" + evt.GetURL() + "', error='" + category + " (" + evt.GetString() + ")'");
|
||||
|
@ -196,7 +196,7 @@ wxWebView* WebView::CreateWebView(wxWindow * parent, wxString const & url)
|
||||
url2.Replace("\\", "/");
|
||||
#endif
|
||||
if (!url2.empty()) { url2 = wxURI(url2).BuildURI(); }
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": " << url2.ToUTF8();
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << ": " << url2.ToUTF8();
|
||||
|
||||
#ifdef __WIN32__
|
||||
wxWebView* webView = new WebViewEdge;
|
||||
@ -270,7 +270,7 @@ void WebView::LoadUrl(wxWebView * webView, wxString const &url)
|
||||
url2.Replace("\\", "/");
|
||||
#endif
|
||||
if (!url2.empty()) { url2 = wxURI(url2).BuildURI(); }
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << url2.ToUTF8();
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << url2.ToUTF8();
|
||||
webView->LoadURL(url2);
|
||||
}
|
||||
|
||||
|
@ -248,7 +248,7 @@ WXLRESULT wxMediaCtrl2::MSWWindowProc(WXUINT nMsg,
|
||||
wxPostEvent(this, evt);
|
||||
}
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(info) << msg.ToUTF8().data();
|
||||
BOOST_LOG_TRIVIAL(trace) << msg.ToUTF8().data();
|
||||
return 0;
|
||||
}
|
||||
return wxMediaCtrl::MSWWindowProc(nMsg, wParam, lParam);
|
||||
|
Loading…
x
Reference in New Issue
Block a user