mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 17:15:56 +08:00
Add some basic hardware specs to logs
Contributes to CURA-10767
This commit is contained in:
parent
15e0975ff0
commit
63e78d313c
@ -5,6 +5,7 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
|
import platform
|
||||||
from typing import cast, TYPE_CHECKING, Optional, Callable, List, Any, Dict
|
from typing import cast, TYPE_CHECKING, Optional, Callable, List, Any, Dict
|
||||||
|
|
||||||
import numpy
|
import numpy
|
||||||
@ -828,6 +829,8 @@ class CuraApplication(QtApplication):
|
|||||||
def run(self):
|
def run(self):
|
||||||
super().run()
|
super().run()
|
||||||
|
|
||||||
|
self._log_hardware_info()
|
||||||
|
|
||||||
if len(ApplicationMetadata.DEPENDENCY_INFO) > 0:
|
if len(ApplicationMetadata.DEPENDENCY_INFO) > 0:
|
||||||
Logger.debug("Using Conan managed dependencies: " + ", ".join(
|
Logger.debug("Using Conan managed dependencies: " + ", ".join(
|
||||||
[dep["recipe"]["id"] for dep in ApplicationMetadata.DEPENDENCY_INFO["installed"] if dep["recipe"]["version"] != "latest"]))
|
[dep["recipe"]["id"] for dep in ApplicationMetadata.DEPENDENCY_INFO["installed"] if dep["recipe"]["version"] != "latest"]))
|
||||||
@ -901,6 +904,14 @@ class CuraApplication(QtApplication):
|
|||||||
|
|
||||||
self.exec()
|
self.exec()
|
||||||
|
|
||||||
|
def _log_hardware_info(self):
|
||||||
|
hardware_info = platform.uname()
|
||||||
|
Logger.info(f"System: {hardware_info.system}")
|
||||||
|
Logger.info(f"Release: {hardware_info.release}")
|
||||||
|
Logger.info(f"Version: {hardware_info.version}")
|
||||||
|
Logger.info(f"Processor name: {hardware_info.processor}")
|
||||||
|
Logger.info(f"CPU Cores: {os.cpu_count()}")
|
||||||
|
|
||||||
def __setUpSingleInstanceServer(self):
|
def __setUpSingleInstanceServer(self):
|
||||||
if self._use_single_instance:
|
if self._use_single_instance:
|
||||||
self._single_instance.startServer()
|
self._single_instance.startServer()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user