From 60dd7691bf6f4f1196f7e624af015b38db9ff3cc Mon Sep 17 00:00:00 2001 From: Huy Pham <42948410+hpham@users.noreply.github.com> Date: Mon, 3 Feb 2020 12:01:10 -0800 Subject: [PATCH] remove unecessary loggings, change less important loggings to logging.debug --- daemon/core/gui/dialogs/copyserviceconfig.py | 2 -- daemon/core/gui/dialogs/customnodes.py | 1 - daemon/core/gui/dialogs/emaneconfig.py | 2 -- daemon/core/gui/dialogs/linkconfig.py | 4 ---- daemon/core/gui/graph/graph.py | 4 +--- daemon/core/gui/graph/node.py | 1 - 6 files changed, 1 insertion(+), 13 deletions(-) diff --git a/daemon/core/gui/dialogs/copyserviceconfig.py b/daemon/core/gui/dialogs/copyserviceconfig.py index 994058fc..c1b4376c 100644 --- a/daemon/core/gui/dialogs/copyserviceconfig.py +++ b/daemon/core/gui/dialogs/copyserviceconfig.py @@ -2,7 +2,6 @@ copy service config dialog """ -import logging import tkinter as tk from tkinter import ttk from typing import TYPE_CHECKING, Any, Tuple @@ -91,7 +90,6 @@ class CopyServiceConfigDialog(Dialog): button.grid(row=0, column=2, sticky="ew", padx=PADX) def click_copy(self): - logging.debug("click copy") selected = self.tree.selection() if selected: item = self.tree.item(selected[0]) diff --git a/daemon/core/gui/dialogs/customnodes.py b/daemon/core/gui/dialogs/customnodes.py index db2fd458..8f3983a6 100644 --- a/daemon/core/gui/dialogs/customnodes.py +++ b/daemon/core/gui/dialogs/customnodes.py @@ -253,7 +253,6 @@ class CustomNodesDialog(Dialog): if self.selected and self.selected in self.app.core.custom_nodes: self.nodes_list.listbox.delete(self.selected_index) del self.app.core.custom_nodes[self.selected] - logging.debug("Delete custom node (%s)", self.selected) self.reset_values() self.nodes_list.listbox.selection_clear(0, tk.END) self.nodes_list.listbox.event_generate("<>") diff --git a/daemon/core/gui/dialogs/emaneconfig.py b/daemon/core/gui/dialogs/emaneconfig.py index 6ef0be78..1bcdd78b 100644 --- a/daemon/core/gui/dialogs/emaneconfig.py +++ b/daemon/core/gui/dialogs/emaneconfig.py @@ -1,7 +1,6 @@ """ emane configuration """ -import logging import tkinter as tk import webbrowser from tkinter import ttk @@ -223,7 +222,6 @@ class EmaneConfigDialog(Dialog): draw emane model configuration """ model_name = self.emane_model.get() - logging.info("configuring emane model: %s", model_name) dialog = EmaneModelDialog( self, self.app, self.canvas_node.core_node, model_name ) diff --git a/daemon/core/gui/dialogs/linkconfig.py b/daemon/core/gui/dialogs/linkconfig.py index 5f16a586..f809059a 100644 --- a/daemon/core/gui/dialogs/linkconfig.py +++ b/daemon/core/gui/dialogs/linkconfig.py @@ -1,7 +1,6 @@ """ link configuration """ -import logging import tkinter as tk from tkinter import ttk from typing import TYPE_CHECKING, Union @@ -248,7 +247,6 @@ class LinkConfigurationDialog(Dialog): self.color_button.config(background=color) def click_apply(self): - logging.debug("click apply") self.app.canvas.itemconfigure(self.edge.id, width=self.width.get()) self.app.canvas.itemconfigure(self.edge.id, fill=self.color.get()) link = self.edge.link @@ -324,8 +322,6 @@ class LinkConfigurationDialog(Dialog): self.destroy() def change_symmetry(self): - logging.debug("change symmetry") - if self.is_symmetric: self.is_symmetric = False self.symmetry_var.set("<<") diff --git a/daemon/core/gui/graph/graph.py b/daemon/core/gui/graph/graph.py index e1f2232a..663c556d 100644 --- a/daemon/core/gui/graph/graph.py +++ b/daemon/core/gui/graph/graph.py @@ -544,14 +544,13 @@ class CanvasGraph(tk.Canvas): node = self.nodes[selected] self.select_object(node.id) self.selected = selected - logging.info( + logging.debug( "selected node(%s), coords: (%s, %s)", node.core_node.name, node.core_node.position.x, node.core_node.position.y, ) else: - logging.debug("create selection box") if self.mode == GraphMode.SELECT: shape = Shape(self.app, self, ShapeType.RECTANGLE, x, y) self.select_box = shape @@ -839,7 +838,6 @@ class CanvasGraph(tk.Canvas): self.to_copy = self.selection.keys() def paste(self): - logging.debug("Paste") # maps original node canvas id to copy node canvas id copy_map = {} # the edges that will be copy over diff --git a/daemon/core/gui/graph/node.py b/daemon/core/gui/graph/node.py index 5ed27954..de3a9204 100644 --- a/daemon/core/gui/graph/node.py +++ b/daemon/core/gui/graph/node.py @@ -248,7 +248,6 @@ class CanvasNode: dialog.show() def show_mobility_player(self): - logging.debug("Mobility player for %s", self.core_node.name) self.canvas.context = None mobility_player = self.app.core.mobility_players[self.core_node.id] mobility_player.show()