Skip to content

Commit 7347b84

Browse files
committed
refactor(bar_manager): remove DEBUG logging
- Removed conditional DEBUG logging statements for cleaner code.
1 parent 9e6ee9f commit 7347b84

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

src/core/bar_manager.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from core.config import get_stylesheet, get_config
1212
from copy import deepcopy
1313
from core.utils.controller import reload_application
14-
from settings import DEBUG
1514

1615
class BarManager(QObject):
1716
styles_modified = pyqtSignal()
@@ -42,8 +41,6 @@ def on_styles_modified(self):
4241
self.stylesheet = stylesheet
4342
for bar in self.bars:
4443
bar.setStyleSheet(self.stylesheet)
45-
if DEBUG:
46-
logging.info("Successfully loaded updated stylesheet and applied to all bars.")
4744

4845
@pyqtSlot()
4946
def on_config_modified(self):
@@ -55,22 +52,19 @@ def on_config_modified(self):
5552
if config and (config != self.config):
5653
if any(config[key] != self.config[key] for key in ['bars', 'widgets', 'komorebi', 'debug', 'env_file']):
5754
self.config = config
58-
reload_application("Reloading Application because of config update...")
55+
reload_application("Reloading Application because of config change.")
5956
else:
6057
self.config = config
61-
if DEBUG:
62-
logging.info("Successfully loaded updated config and re-initialised all bars.")
58+
logging.info("Successfully loaded updated config and re-initialised all bars.")
6359

6460
@pyqtSlot(QScreen)
6561
def on_screens_update(self, _screen: QScreen) -> None:
66-
if DEBUG:
67-
logging.info("Screens updated. Re-initialising all bars.")
68-
reload_application("Reloading Application because of screen update...", forced=True)
62+
logging.info("Screens updated. Re-initialising all bars.")
63+
reload_application("Reloading Application because of screen update.", forced=True)
6964

7065
def run_listeners_in_threads(self):
7166
for listener in self.widget_event_listeners:
72-
if DEBUG:
73-
logging.info(f"Starting {listener.__name__}...")
67+
logging.info(f"Starting {listener.__name__}...")
7468
thread = listener()
7569
thread.start()
7670
self._threads[listener] = thread

0 commit comments

Comments
 (0)