summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--grc/core/platform.py1
-rwxr-xr-xgrc/main.py10
2 files changed, 9 insertions, 2 deletions
diff --git a/grc/core/platform.py b/grc/core/platform.py
index 7426c178f6..8ba473a2cc 100644
--- a/grc/core/platform.py
+++ b/grc/core/platform.py
@@ -26,7 +26,6 @@ from .FlowGraph import FlowGraph
from .Connection import Connection
logger = logging.getLogger(__name__)
-logging.basicConfig(level=logging.INFO)
class Platform(Element):
diff --git a/grc/main.py b/grc/main.py
index f3b43d662a..06097ed58d 100755
--- a/grc/main.py
+++ b/grc/main.py
@@ -40,7 +40,15 @@ def main():
# Enable logging
# Note: All other modules need to use the 'grc.<module>' convention
log = logging.getLogger('grc')
- log.setLevel(logging.INFO)
+ # NOTE: This sets the log level to what was requested for the logger on the
+ # command line, but this may not be the correct approach if multiple handlers
+ # are intended to be used. The logger level shown here indicates all the log
+ # messages that are captured and the handler levels indicate messages each
+ # handler will output. A better approach may be resetting this to logging.DEBUG
+ # to catch everything and making sure the handlers have the correct levels set.
+ # This would be useful for a future GUI logging window that can filter messages
+ # independently of the console output. In this case, this should be DEBUG.
+ log.setLevel(LOG_LEVELS[args.log])
# Console formatting
console = logging.StreamHandler()