updates to python based logging to use module named loggers, updated logging config file to align with these changes
This commit is contained in:
parent
55d5bb3859
commit
69652ac577
63 changed files with 717 additions and 606 deletions
|
@ -9,6 +9,8 @@ from core.gui import nodeutils as nutils
|
|||
from core.gui.graph.edges import CanvasEdge
|
||||
from core.gui.graph.node import CanvasNode
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from core.gui.app import Application
|
||||
|
||||
|
@ -196,12 +198,12 @@ class InterfaceManager:
|
|||
else:
|
||||
self.current_subnets = self.next_subnets()
|
||||
else:
|
||||
logging.info("ignoring subnet change for link between network nodes")
|
||||
logger.info("ignoring subnet change for link between network nodes")
|
||||
|
||||
def find_subnets(
|
||||
self, canvas_node: CanvasNode, visited: Set[int] = None
|
||||
) -> Optional[IPNetwork]:
|
||||
logging.info("finding subnet for node: %s", canvas_node.core_node.name)
|
||||
logger.info("finding subnet for node: %s", canvas_node.core_node.name)
|
||||
subnets = None
|
||||
if not visited:
|
||||
visited = set()
|
||||
|
@ -220,7 +222,7 @@ class InterfaceManager:
|
|||
else:
|
||||
subnets = self.find_subnets(check_node, visited)
|
||||
if subnets:
|
||||
logging.info("found subnets: %s", subnets)
|
||||
logger.info("found subnets: %s", subnets)
|
||||
break
|
||||
return subnets
|
||||
|
||||
|
@ -244,7 +246,7 @@ class InterfaceManager:
|
|||
iface1=src_iface,
|
||||
iface2=dst_iface,
|
||||
)
|
||||
logging.info("added link between %s and %s", src_node.name, dst_node.name)
|
||||
logger.info("added link between %s and %s", src_node.name, dst_node.name)
|
||||
return link
|
||||
|
||||
def create_iface(self, canvas_node: CanvasNode, wireless_link: bool) -> Interface:
|
||||
|
@ -266,5 +268,5 @@ class InterfaceManager:
|
|||
ip6=ip6,
|
||||
ip6_mask=ip6_mask,
|
||||
)
|
||||
logging.info("create node(%s) interface(%s)", node.name, iface)
|
||||
logger.info("create node(%s) interface(%s)", node.name, iface)
|
||||
return iface
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue