Change some of the logging messages to info

CURA-6525
This commit is contained in:
Jaime van Kessel 2019-05-15 17:25:31 +02:00
parent bec7b6546d
commit 843bb6f5a3
3 changed files with 9 additions and 5 deletions

View file

@ -394,6 +394,7 @@ class MachineManager(QObject):
@pyqtSlot(str) @pyqtSlot(str)
@pyqtSlot(str, str) @pyqtSlot(str, str)
def addMachine(self, definition_id: str, name: Optional[str] = None) -> None: def addMachine(self, definition_id: str, name: Optional[str] = None) -> None:
Logger.log("i", "Trying to add a machine with the definition id [%s]", definition_id)
if name is None: if name is None:
definitions = CuraContainerRegistry.getInstance().findDefinitionContainers(id = definition_id) definitions = CuraContainerRegistry.getInstance().findDefinitionContainers(id = definition_id)
if definitions: if definitions:
@ -464,6 +465,7 @@ class MachineManager(QObject):
# \param key \type{str} the name of the key to delete # \param key \type{str} the name of the key to delete
@pyqtSlot(str) @pyqtSlot(str)
def clearUserSettingAllCurrentStacks(self, key: str) -> None: def clearUserSettingAllCurrentStacks(self, key: str) -> None:
Logger.log("i", "Clearing the setting [%s] from all stacks", key)
if not self._global_container_stack: if not self._global_container_stack:
return return
@ -786,6 +788,7 @@ class MachineManager(QObject):
@pyqtSlot(str) @pyqtSlot(str)
def removeMachine(self, machine_id: str) -> None: def removeMachine(self, machine_id: str) -> None:
Logger.log("i", "Attempting to remove a machine with the id [%s]", machine_id)
# If the machine that is being removed is the currently active machine, set another machine as the active machine. # If the machine that is being removed is the currently active machine, set another machine as the active machine.
activate_new_machine = (self._global_container_stack and self._global_container_stack.getId() == machine_id) activate_new_machine = (self._global_container_stack and self._global_container_stack.getId() == machine_id)
@ -1273,7 +1276,7 @@ class MachineManager(QObject):
def _updateQualityWithMaterial(self, *args: Any) -> None: def _updateQualityWithMaterial(self, *args: Any) -> None:
if self._global_container_stack is None: if self._global_container_stack is None:
return return
Logger.log("i", "Updating quality/quality_changes due to material change") Logger.log("d", "Updating quality/quality_changes due to material change")
current_quality_type = None current_quality_type = None
if self._current_quality_group: if self._current_quality_group:
current_quality_type = self._current_quality_group.quality_type current_quality_type = self._current_quality_group.quality_type
@ -1354,6 +1357,7 @@ class MachineManager(QObject):
# instance with the same network key. # instance with the same network key.
@pyqtSlot(str) @pyqtSlot(str)
def switchPrinterType(self, machine_name: str) -> None: def switchPrinterType(self, machine_name: str) -> None:
Logger.log("i", "Attempting to switch the printer type to [%s]", machine_name)
# Don't switch if the user tries to change to the same type of printer # Don't switch if the user tries to change to the same type of printer
if self._global_container_stack is None or self.activeMachineDefinitionName == machine_name: if self._global_container_stack is None or self.activeMachineDefinitionName == machine_name:
return return

View file

@ -207,7 +207,7 @@ class CuraEngineBackend(QObject, Backend):
self._createSocket() self._createSocket()
if self._process_layers_job is not None: # We were processing layers. Stop that, the layers are going to change soon. if self._process_layers_job is not None: # We were processing layers. Stop that, the layers are going to change soon.
Logger.log("d", "Aborting process layers job...") Logger.log("i", "Aborting process layers job...")
self._process_layers_job.abort() self._process_layers_job.abort()
self._process_layers_job = None self._process_layers_job = None
@ -222,7 +222,7 @@ class CuraEngineBackend(QObject, Backend):
## Perform a slice of the scene. ## Perform a slice of the scene.
def slice(self) -> None: def slice(self) -> None:
Logger.log("d", "Starting to slice...") Logger.log("i", "Starting to slice...")
self._slice_start_time = time() self._slice_start_time = time()
if not self._build_plates_to_be_sliced: if not self._build_plates_to_be_sliced:
self.processingProgress.emit(1.0) self.processingProgress.emit(1.0)

View file

@ -278,7 +278,7 @@ class Toolbox(QObject, Extension):
for plugin_id in old_plugin_ids: for plugin_id in old_plugin_ids:
# Neither the installed packages nor the packages that are scheduled to remove are old plugins # Neither the installed packages nor the packages that are scheduled to remove are old plugins
if plugin_id not in installed_package_ids and plugin_id not in scheduled_to_remove_package_ids: if plugin_id not in installed_package_ids and plugin_id not in scheduled_to_remove_package_ids:
Logger.log("i", "Found a plugin that was installed with the old plugin browser: %s", plugin_id) Logger.log("d", "Found a plugin that was installed with the old plugin browser: %s", plugin_id)
old_metadata = self._plugin_registry.getMetaData(plugin_id) old_metadata = self._plugin_registry.getMetaData(plugin_id)
new_metadata = self._convertPluginMetadata(old_metadata) new_metadata = self._convertPluginMetadata(old_metadata)
@ -526,7 +526,7 @@ class Toolbox(QObject, Extension):
# Make API Calls # Make API Calls
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
def _makeRequestByType(self, request_type: str) -> None: def _makeRequestByType(self, request_type: str) -> None:
Logger.log("i", "Requesting %s metadata from server.", request_type) Logger.log("d", "Requesting %s metadata from server.", request_type)
request = QNetworkRequest(self._request_urls[request_type]) request = QNetworkRequest(self._request_urls[request_type])
for header_name, header_value in self._request_headers: for header_name, header_value in self._request_headers:
request.setRawHeader(header_name, header_value) request.setRawHeader(header_name, header_value)