Skip to content

Commit

Permalink
add option to completely disable the log
Browse files Browse the repository at this point in the history
  • Loading branch information
cwiede committed Aug 4, 2020
1 parent e39728f commit 13fc232
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions nexxT/services/gui/GuiLogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,17 +263,9 @@ def __init__(self):
self.actClear.triggered.connect(self.logWidget.clear)
#self.actSingleLine.toggled.connect(self.logWidget.setUniformRowHeights)

self.actInternal = QAction("Internal")
self.actDebug = QAction("Debug")
self.actInfo = QAction("Info")
self.actWarning = QAction("Warning")
self.actError = QAction("Error")
self.actDisable = QAction("Disable")
self.actDisable.triggered.connect(self.setLogLevel)

self.actInternal.triggered.connect(lambda: mainLogger.setLevel(logging.INTERNAL))
self.actDebug.triggered.connect(lambda: mainLogger.setLevel(logging.DEBUG))
self.actInfo.triggered.connect(lambda: mainLogger.setLevel(logging.INFO))
self.actWarning.triggered.connect(lambda: mainLogger.setLevel(logging.WARNING))
self.actError.triggered.connect(lambda: mainLogger.setLevel(logging.ERROR))
self.actGroup = QActionGroup(self)
self.actGroup.setExclusive(True)
levelno = mainLogger.level
Expand All @@ -292,6 +284,9 @@ def __init__(self):
else:
a.setChecked(False)
logMenu.addAction(a)
self.loglevelMap[self.actDisable] = 100
logMenu.addAction(self.actDisable)

logMenu.addSeparator()
logMenu.addAction(self.actClear)
logMenu.addAction(self.actFollow)
Expand Down

0 comments on commit 13fc232

Please sign in to comment.