From 09397925e89a78d823c35491cb54a74e6d6f6eb3 Mon Sep 17 00:00:00 2001 From: Huy Pham <42948410+hpham@users.noreply.github.com> Date: Mon, 3 Feb 2020 07:54:28 -0800 Subject: [PATCH] remove unnecessary loggings --- daemon/core/gui/dialogs/emaneconfig.py | 1 - daemon/core/gui/dialogs/mobilityconfig.py | 2 -- daemon/core/gui/dialogs/nodeconfig.py | 1 - daemon/core/gui/dialogs/nodeconfigservice.py | 1 - daemon/core/gui/dialogs/nodeservice.py | 2 -- daemon/core/gui/dialogs/wlanconfig.py | 2 -- daemon/core/gui/graph/edges.py | 2 -- daemon/core/gui/graph/node.py | 3 --- daemon/core/gui/graph/shape.py | 4 ---- 9 files changed, 18 deletions(-) diff --git a/daemon/core/gui/dialogs/emaneconfig.py b/daemon/core/gui/dialogs/emaneconfig.py index 61ed93ff..6ef0be78 100644 --- a/daemon/core/gui/dialogs/emaneconfig.py +++ b/daemon/core/gui/dialogs/emaneconfig.py @@ -107,7 +107,6 @@ class EmaneConfigDialog(Dialog): def __init__( self, master: "Application", app: "Application", canvas_node: "CanvasNode" ): - logging.debug("EMANE configuration for %s", canvas_node.core_node.name) super().__init__( master, app, f"{canvas_node.core_node.name} EMANE Configuration", modal=True ) diff --git a/daemon/core/gui/dialogs/mobilityconfig.py b/daemon/core/gui/dialogs/mobilityconfig.py index 39f11371..18e62a17 100644 --- a/daemon/core/gui/dialogs/mobilityconfig.py +++ b/daemon/core/gui/dialogs/mobilityconfig.py @@ -1,7 +1,6 @@ """ mobility configuration """ -import logging from tkinter import ttk from typing import TYPE_CHECKING @@ -21,7 +20,6 @@ class MobilityConfigDialog(Dialog): def __init__( self, master: "Application", app: "Application", canvas_node: "CanvasNode" ): - logging.debug("Mobility configuration for %s", canvas_node.core_node.name) super().__init__( master, app, diff --git a/daemon/core/gui/dialogs/nodeconfig.py b/daemon/core/gui/dialogs/nodeconfig.py index 2226acd4..7db65dc7 100644 --- a/daemon/core/gui/dialogs/nodeconfig.py +++ b/daemon/core/gui/dialogs/nodeconfig.py @@ -52,7 +52,6 @@ class NodeConfigDialog(Dialog): """ create an instance of node configuration """ - logging.debug("Node configuration for %s", canvas_node.core_node.name) super().__init__( master, app, f"{canvas_node.core_node.name} Configuration", modal=True ) diff --git a/daemon/core/gui/dialogs/nodeconfigservice.py b/daemon/core/gui/dialogs/nodeconfigservice.py index ce601a0d..1230cede 100644 --- a/daemon/core/gui/dialogs/nodeconfigservice.py +++ b/daemon/core/gui/dialogs/nodeconfigservice.py @@ -24,7 +24,6 @@ class NodeConfigServiceDialog(Dialog): canvas_node: "CanvasNode", services: Set[str] = None, ): - logging.debug("Service configuration for %s", canvas_node.core_node.name) title = f"{canvas_node.core_node.name} Config Services" super().__init__(master, app, title, modal=True) self.app = app diff --git a/daemon/core/gui/dialogs/nodeservice.py b/daemon/core/gui/dialogs/nodeservice.py index c78f5cae..0b4391ce 100644 --- a/daemon/core/gui/dialogs/nodeservice.py +++ b/daemon/core/gui/dialogs/nodeservice.py @@ -1,7 +1,6 @@ """ core node services """ -import logging import tkinter as tk from tkinter import messagebox, ttk from typing import TYPE_CHECKING, Any, Set @@ -25,7 +24,6 @@ class NodeServiceDialog(Dialog): canvas_node: "CanvasNode", services: Set[str] = None, ): - logging.debug("Node services for %s", canvas_node.core_node.name) title = f"{canvas_node.core_node.name} Services" super().__init__(master, app, title, modal=True) self.app = app diff --git a/daemon/core/gui/dialogs/wlanconfig.py b/daemon/core/gui/dialogs/wlanconfig.py index de012106..264b9e2e 100644 --- a/daemon/core/gui/dialogs/wlanconfig.py +++ b/daemon/core/gui/dialogs/wlanconfig.py @@ -2,7 +2,6 @@ wlan configuration """ -import logging from tkinter import ttk from typing import TYPE_CHECKING @@ -22,7 +21,6 @@ class WlanConfigDialog(Dialog): def __init__( self, master: "Application", app: "Application", canvas_node: "CanvasNode" ): - logging.debug("Wlan Configuration for %s", canvas_node.core_node.name) super().__init__( master, app, f"{canvas_node.core_node.name} Wlan Configuration", modal=True ) diff --git a/daemon/core/gui/graph/edges.py b/daemon/core/gui/graph/edges.py index 518e9277..1259ffa9 100644 --- a/daemon/core/gui/graph/edges.py +++ b/daemon/core/gui/graph/edges.py @@ -213,7 +213,6 @@ class CanvasEdge: self.canvas.itemconfig(self.id, fill=EDGE_COLOR, width=EDGE_WIDTH) def create_context(self, event: tk.Event): - logging.debug("create link context") context = tk.Menu(self.canvas) themes.style_menu(context) context.add_command(label="Configure", command=self.configure) @@ -227,6 +226,5 @@ class CanvasEdge: context.post(event.x_root, event.y_root) def configure(self): - logging.debug("link configuration") dialog = LinkConfigurationDialog(self.canvas, self.canvas.app, self) dialog.show() diff --git a/daemon/core/gui/graph/node.py b/daemon/core/gui/graph/node.py index ffb5de3e..5ed27954 100644 --- a/daemon/core/gui/graph/node.py +++ b/daemon/core/gui/graph/node.py @@ -42,9 +42,6 @@ class CanvasNode: self.id = self.canvas.create_image( x, y, anchor=tk.CENTER, image=self.image, tags=tags.NODE ) - logging.debug( - "Draw canvas node for node(%s), canvas id: %s", core_node.name, self.id - ) text_font = font.Font(family="TkIconFont", size=12) label_y = self._get_label_y() self.text_id = self.canvas.create_text( diff --git a/daemon/core/gui/graph/shape.py b/daemon/core/gui/graph/shape.py index 08ce62f3..82b58a71 100644 --- a/daemon/core/gui/graph/shape.py +++ b/daemon/core/gui/graph/shape.py @@ -86,7 +86,6 @@ class Shape: outline=self.shape_data.border_color, width=self.shape_data.border_width, ) - logging.debug("Create oval, id(%s)", self.id) self.draw_shape_text() elif self.shape_type == ShapeType.RECTANGLE: self.id = self.canvas.create_rectangle( @@ -100,7 +99,6 @@ class Shape: outline=self.shape_data.border_color, width=self.shape_data.border_width, ) - logging.debug("Create rectangle, id(%s)", self.id) self.draw_shape_text() elif self.shape_type == ShapeType.TEXT: font = self.get_font() @@ -112,7 +110,6 @@ class Shape: fill=self.shape_data.text_color, font=font, ) - logging.debug("Create text, id(%s)", self.id) else: logging.error("unknown shape type: %s", self.shape_type) self.created = True @@ -147,7 +144,6 @@ class Shape: def shape_complete(self, x: float, y: float): for component in tags.ABOVE_SHAPE: self.canvas.tag_raise(component) - logging.debug("Complete shape, id(%s)", self.id) s = ShapeDialog(self.app, self.app, self) s.show()