mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-08-27 20:40:13 +03:00
feat: suppress nornir INFO logs to reduce console verbosity
Set logging level for nornir.core and nornir loggers to WARNING in config_tools_nornir.py and display_tools_nornir.py. This prevents nornir from logging task execution at INFO level to the console, as the logging={"enabled": False} parameter in InitNornir only disables plugin internal logs.
This commit is contained in:
parent
2485bfec46
commit
28f2fe03e6
@ -49,6 +49,12 @@ from gns3server.agent.gns3_copilot.utils import get_device_ports_from_topology
|
||||
# config log
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Suppress nornir INFO logs in console (reduce verbosity)
|
||||
# The logging={"enabled": False} in InitNornir only disables plugin internal logs,
|
||||
# but nornir.core still logs task execution at INFO level. Set to WARNING to suppress these.
|
||||
logging.getLogger("nornir.core").setLevel(logging.WARNING)
|
||||
logging.getLogger("nornir").setLevel(logging.WARNING)
|
||||
|
||||
|
||||
# Local Nornir configuration functions for Cisco IOS Telnet devices
|
||||
def _get_nornir_defaults() -> dict[str, Any]:
|
||||
|
||||
@ -49,6 +49,12 @@ from gns3server.agent.gns3_copilot.utils import get_device_ports_from_topology
|
||||
# config log
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Suppress nornir INFO logs in console (reduce verbosity)
|
||||
# The logging={"enabled": False} in InitNornir only disables plugin internal logs,
|
||||
# but nornir.core still logs task execution at INFO level. Set to WARNING to suppress these.
|
||||
logging.getLogger("nornir.core").setLevel(logging.WARNING)
|
||||
logging.getLogger("nornir").setLevel(logging.WARNING)
|
||||
|
||||
|
||||
# Local Nornir configuration functions for Cisco IOS Telnet devices
|
||||
def _get_nornir_defaults() -> dict[str, Any]:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user