mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-23 17:02:39 +00:00
chore: reduce diagnostic logging level to trace
This commit is contained in:
@@ -573,13 +573,13 @@ namespace Slic3r
|
||||
<< " cur_selected=" << selected_machine;
|
||||
auto my_machine_list = get_my_machine_list(get_current_printer_agent_id());
|
||||
auto it = my_machine_list.find(dev_id);
|
||||
BOOST_LOG_TRIVIAL(info) << "Orca diagnostic: set_selected_machine lookup dev_id=" << dev_id
|
||||
BOOST_LOG_TRIVIAL(trace) << "Orca diagnostic: set_selected_machine lookup dev_id=" << dev_id
|
||||
<< " found=" << (it != my_machine_list.end())
|
||||
<< " my_machine_count=" << my_machine_list.size()
|
||||
<< " current_agent=" << get_current_printer_agent_id()
|
||||
<< " provider=" << GUI::wxGetApp().get_printer_cloud_provider();
|
||||
if (it != my_machine_list.end() && it->second) {
|
||||
BOOST_LOG_TRIVIAL(info) << "Orca diagnostic: target machine dev_id=" << it->second->get_dev_id()
|
||||
BOOST_LOG_TRIVIAL(trace) << "Orca diagnostic: target machine dev_id=" << it->second->get_dev_id()
|
||||
<< " printer_agent_id=" << it->second->printer_agent_id
|
||||
<< " connection_type=" << it->second->connection_type()
|
||||
<< " dev_connection_type=" << it->second->dev_connection_type;
|
||||
@@ -598,7 +598,7 @@ namespace Slic3r
|
||||
}
|
||||
else if (last_selected->second->connection_type() == "cloud") {
|
||||
const int result = m_agent->set_user_selected_machine("");
|
||||
BOOST_LOG_TRIVIAL(info) << "Orca diagnostic: cleared previous cloud selection dev_id="
|
||||
BOOST_LOG_TRIVIAL(trace) << "Orca diagnostic: cleared previous cloud selection dev_id="
|
||||
<< selected_machine << " result=" << result;
|
||||
}
|
||||
}
|
||||
@@ -652,7 +652,7 @@ namespace Slic3r
|
||||
// diff dev_id, cloud => set_user_selected_machine(new)
|
||||
BOOST_LOG_TRIVIAL(info) << "set_selected_machine: select new cloud machine, dev_id =" << dev_id;
|
||||
const int result = m_agent->set_user_selected_machine(dev_id);
|
||||
BOOST_LOG_TRIVIAL(info) << "Orca diagnostic: set new cloud selection dev_id="
|
||||
BOOST_LOG_TRIVIAL(trace) << "Orca diagnostic: set new cloud selection dev_id="
|
||||
<< dev_id << " result=" << result;
|
||||
it->second->reset();
|
||||
}
|
||||
@@ -681,7 +681,7 @@ namespace Slic3r
|
||||
|
||||
selected_machine = dev_id;
|
||||
record_user_last_machine(selected_machine);
|
||||
BOOST_LOG_TRIVIAL(info) << "Orca diagnostic: DeviceManager selection complete selected_machine="
|
||||
BOOST_LOG_TRIVIAL(trace) << "Orca diagnostic: DeviceManager selection complete selected_machine="
|
||||
<< selected_machine;
|
||||
return true;
|
||||
}
|
||||
@@ -714,7 +714,7 @@ namespace Slic3r
|
||||
BOOST_LOG_TRIVIAL(trace) << "add_user_subscribe: " << it->first;
|
||||
}
|
||||
const int result = m_agent->add_subscribe(dev_list);
|
||||
BOOST_LOG_TRIVIAL(info) << "Orca diagnostic: add_user_subscribe count=" << dev_list.size()
|
||||
BOOST_LOG_TRIVIAL(trace) << "Orca diagnostic: add_user_subscribe count=" << dev_list.size()
|
||||
<< " result=" << result;
|
||||
}
|
||||
|
||||
@@ -729,7 +729,7 @@ namespace Slic3r
|
||||
BOOST_LOG_TRIVIAL(trace) << "del_user_subscribe: " << it->first;
|
||||
}
|
||||
const int result = m_agent->del_subscribe(dev_list);
|
||||
BOOST_LOG_TRIVIAL(info) << "Orca diagnostic: del_user_subscribe count=" << dev_list.size()
|
||||
BOOST_LOG_TRIVIAL(trace) << "Orca diagnostic: del_user_subscribe count=" << dev_list.size()
|
||||
<< " result=" << result;
|
||||
}
|
||||
|
||||
@@ -948,7 +948,7 @@ namespace Slic3r
|
||||
obj->set_access_code(acc_code);
|
||||
}
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << "Orca diagnostic: parsed cloud machine dev_id=" << dev_id
|
||||
BOOST_LOG_TRIVIAL(trace) << "Orca diagnostic: parsed cloud machine dev_id=" << dev_id
|
||||
<< " name=" << obj->get_dev_name()
|
||||
<< " agent_id=" << obj->printer_agent_id
|
||||
<< " connection_type=" << obj->connection_type()
|
||||
@@ -968,7 +968,7 @@ namespace Slic3r
|
||||
iterat++;
|
||||
}
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(info) << "Orca diagnostic: parse_user_print_info complete provider=" << provider
|
||||
BOOST_LOG_TRIVIAL(trace) << "Orca diagnostic: parse_user_print_info complete provider=" << provider
|
||||
<< " parsed_count=" << new_list.size()
|
||||
<< " stored_count=" << userMachineList.size();
|
||||
}
|
||||
@@ -987,14 +987,14 @@ namespace Slic3r
|
||||
unsigned int http_code;
|
||||
std::string body;
|
||||
int result = m_agent->get_user_print_info(&http_code, &body, provider);
|
||||
BOOST_LOG_TRIVIAL(info) << "Orca diagnostic: get_user_print_info provider=" << provider
|
||||
BOOST_LOG_TRIVIAL(trace) << "Orca diagnostic: get_user_print_info provider=" << provider
|
||||
<< " result=" << result << " http_code=" << http_code
|
||||
<< " body_bytes=" << body.size();
|
||||
if (result == 0)
|
||||
{
|
||||
// parse_user_print_info and on_machine_alive (SSDP for discovery) both mutate the same userMachineList map.
|
||||
// on_machine_alive mutates the map on the UI thread, do the same for parse_user_print_info.
|
||||
BOOST_LOG_TRIVIAL(info) << "Orca diagnostic: queueing parse_user_print_info on UI thread";
|
||||
BOOST_LOG_TRIVIAL(trace) << "Orca diagnostic: queueing parse_user_print_info on UI thread";
|
||||
Slic3r::GUI::wxGetApp().CallAfter([this, body]() { parse_user_print_info(body); });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ void MonitorPanel::msw_rescale()
|
||||
|
||||
void MonitorPanel::select_machine(std::string machine_sn)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << "Orca diagnostic: MonitorPanel::select_machine queueing machine_sn=" << machine_sn;
|
||||
BOOST_LOG_TRIVIAL(trace) << "Orca diagnostic: MonitorPanel::select_machine queueing machine_sn=" << machine_sn;
|
||||
wxCommandEvent *event = new wxCommandEvent(wxEVT_COMMAND_CHOICE_SELECTED);
|
||||
event->SetString(machine_sn);
|
||||
wxQueueEvent(this, event);
|
||||
@@ -280,7 +280,7 @@ void MonitorPanel::on_select_printer(wxCommandEvent& event)
|
||||
{
|
||||
Slic3r::DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();
|
||||
const std::string requested_dev_id = event.GetString().ToStdString();
|
||||
BOOST_LOG_TRIVIAL(info) << "Orca diagnostic: MonitorPanel::on_select_printer requested_dev_id="
|
||||
BOOST_LOG_TRIVIAL(trace) << "Orca diagnostic: MonitorPanel::on_select_printer requested_dev_id="
|
||||
<< requested_dev_id << " device_manager=" << (dev ? "set" : "null");
|
||||
if (!dev) return;
|
||||
|
||||
@@ -289,7 +289,7 @@ void MonitorPanel::on_select_printer(wxCommandEvent& event)
|
||||
}
|
||||
|
||||
const bool selected = dev->set_selected_machine(requested_dev_id);
|
||||
BOOST_LOG_TRIVIAL(info) << "Orca diagnostic: MonitorPanel::on_select_printer set_selected_machine result="
|
||||
BOOST_LOG_TRIVIAL(trace) << "Orca diagnostic: MonitorPanel::on_select_printer set_selected_machine result="
|
||||
<< selected << " selected_dev_id="
|
||||
<< (dev->get_selected_machine() ? dev->get_selected_machine()->get_dev_id() : "<null>");
|
||||
if (!selected)
|
||||
|
||||
@@ -953,11 +953,11 @@ std::string NetworkAgent::get_user_selected_machine()
|
||||
|
||||
int NetworkAgent::set_user_selected_machine(std::string dev_id)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << "NetworkAgent::set_user_selected_machine: dev_id=" << dev_id
|
||||
BOOST_LOG_TRIVIAL(trace) << "NetworkAgent::set_user_selected_machine: dev_id=" << dev_id
|
||||
<< " printer_agent=" << (m_printer_agent ? m_printer_agent->get_agent_info().id : "<null>");
|
||||
if (m_printer_agent) {
|
||||
const int result = m_printer_agent->set_user_selected_machine(dev_id);
|
||||
BOOST_LOG_TRIVIAL(info) << "NetworkAgent::set_user_selected_machine: result=" << result;
|
||||
BOOST_LOG_TRIVIAL(trace) << "NetworkAgent::set_user_selected_machine: result=" << result;
|
||||
return result;
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(warning) << "NetworkAgent::set_user_selected_machine: no printer agent";
|
||||
@@ -980,11 +980,11 @@ int NetworkAgent::stop_subscribe(std::string module)
|
||||
|
||||
int NetworkAgent::add_subscribe(std::vector<std::string> dev_list)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << "NetworkAgent::add_subscribe: count=" << dev_list.size()
|
||||
BOOST_LOG_TRIVIAL(trace) << "NetworkAgent::add_subscribe: count=" << dev_list.size()
|
||||
<< " printer_agent=" << (m_printer_agent ? m_printer_agent->get_agent_info().id : "<null>");
|
||||
if (m_printer_agent) {
|
||||
const int result = m_printer_agent->add_subscribe(std::move(dev_list));
|
||||
BOOST_LOG_TRIVIAL(info) << "NetworkAgent::add_subscribe: result=" << result;
|
||||
BOOST_LOG_TRIVIAL(trace) << "NetworkAgent::add_subscribe: result=" << result;
|
||||
return result;
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(warning) << "NetworkAgent::add_subscribe: no printer agent";
|
||||
@@ -993,11 +993,11 @@ int NetworkAgent::add_subscribe(std::vector<std::string> dev_list)
|
||||
|
||||
int NetworkAgent::del_subscribe(std::vector<std::string> dev_list)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << "NetworkAgent::del_subscribe: count=" << dev_list.size()
|
||||
BOOST_LOG_TRIVIAL(trace) << "NetworkAgent::del_subscribe: count=" << dev_list.size()
|
||||
<< " printer_agent=" << (m_printer_agent ? m_printer_agent->get_agent_info().id : "<null>");
|
||||
if (m_printer_agent) {
|
||||
const int result = m_printer_agent->del_subscribe(std::move(dev_list));
|
||||
BOOST_LOG_TRIVIAL(info) << "NetworkAgent::del_subscribe: result=" << result;
|
||||
BOOST_LOG_TRIVIAL(trace) << "NetworkAgent::del_subscribe: result=" << result;
|
||||
return result;
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(warning) << "NetworkAgent::del_subscribe: no printer agent";
|
||||
|
||||
Reference in New Issue
Block a user