From 95985c7c1b3c43a9629487af81a71e466e5745d0 Mon Sep 17 00:00:00 2001 From: David Rose Date: Sat, 14 Oct 2006 00:05:52 +0000 Subject: [PATCH] the default notify level needs to be info. --- direct/src/directnotify/DirectNotify.py | 49 ++++++++++++------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/direct/src/directnotify/DirectNotify.py b/direct/src/directnotify/DirectNotify.py index 62d778f6c4..8e25033530 100644 --- a/direct/src/directnotify/DirectNotify.py +++ b/direct/src/directnotify/DirectNotify.py @@ -76,37 +76,34 @@ class DirectNotify: if not level: # see if there's an override of the default config level - level = config.GetString('default-directnotify-level', '') + level = config.GetString('default-directnotify-level', 'info') + if not level: + level = 'error' category = self.getCategory(categoryName) - if level: - # Note - this print statement is making it difficult to - # achieve "no output unless there's an error" operation - Josh - # print ("Setting DirectNotify category: " + categoryName + - # " to severity: " + level) - if level == "error": - category.setWarning(0) - category.setInfo(0) - category.setDebug(0) - elif level == "warning": - category.setWarning(1) - category.setInfo(0) - category.setDebug(0) - elif level == "info": - category.setWarning(1) - category.setInfo(1) - category.setDebug(0) - elif level == "debug": - category.setWarning(1) - category.setInfo(1) - category.setDebug(1) - else: - print ("DirectNotify: unknown notify level: " + str(level) - + " for category: " + str(categoryName)) - else: + # Note - this print statement is making it difficult to + # achieve "no output unless there's an error" operation - Josh + # print ("Setting DirectNotify category: " + categoryName + + # " to severity: " + level) + if level == "error": category.setWarning(0) category.setInfo(0) category.setDebug(0) + elif level == "warning": + category.setWarning(1) + category.setInfo(0) + category.setDebug(0) + elif level == "info": + category.setWarning(1) + category.setInfo(1) + category.setDebug(0) + elif level == "debug": + category.setWarning(1) + category.setInfo(1) + category.setDebug(1) + else: + print ("DirectNotify: unknown notify level: " + str(level) + + " for category: " + str(categoryName)) def setDconfigLevels(self):