mirror of
https://github.com/panda3d/panda3d.git
synced 2025-11-03 03:53:36 -05:00
added setVerbose() and modified setDconfigLevels to undo setVerbose()
This commit is contained in:
parent
cd3a6ec5a8
commit
378c3757d5
@ -78,12 +78,12 @@ class DirectNotify:
|
|||||||
# see if there's an override of the default config level
|
# see if there's an override of the default config level
|
||||||
level = config.GetString('default-directnotify-level', '')
|
level = config.GetString('default-directnotify-level', '')
|
||||||
|
|
||||||
|
category = self.getCategory(categoryName)
|
||||||
if level:
|
if level:
|
||||||
# Note - this print statement is making it difficult to
|
# Note - this print statement is making it difficult to
|
||||||
# achieve "no output unless there's an error" operation - Josh
|
# achieve "no output unless there's an error" operation - Josh
|
||||||
# print ("Setting DirectNotify category: " + categoryName +
|
# print ("Setting DirectNotify category: " + categoryName +
|
||||||
# " to severity: " + level)
|
# " to severity: " + level)
|
||||||
category = self.getCategory(categoryName)
|
|
||||||
if level == "error":
|
if level == "error":
|
||||||
category.setWarning(0)
|
category.setWarning(0)
|
||||||
category.setInfo(0)
|
category.setInfo(0)
|
||||||
@ -103,11 +103,23 @@ class DirectNotify:
|
|||||||
else:
|
else:
|
||||||
print ("DirectNotify: unknown notify level: " + str(level)
|
print ("DirectNotify: unknown notify level: " + str(level)
|
||||||
+ " for category: " + str(categoryName))
|
+ " for category: " + str(categoryName))
|
||||||
|
else:
|
||||||
|
category.setWarning(0)
|
||||||
|
category.setInfo(0)
|
||||||
|
category.setDebug(0)
|
||||||
|
|
||||||
|
|
||||||
def setDconfigLevels(self):
|
def setDconfigLevels(self):
|
||||||
for categoryName in self.getCategories():
|
for categoryName in self.getCategories():
|
||||||
self.setDconfigLevel(categoryName)
|
self.setDconfigLevel(categoryName)
|
||||||
|
|
||||||
|
def setVerbose(self):
|
||||||
|
for categoryName in self.getCategories():
|
||||||
|
category = self.getCategory(categoryName)
|
||||||
|
category.setWarning(1)
|
||||||
|
category.setInfo(1)
|
||||||
|
category.setDebug(1)
|
||||||
|
|
||||||
def popupControls(self, tl = None):
|
def popupControls(self, tl = None):
|
||||||
from direct.tkpanels import NotifyPanel
|
from direct.tkpanels import NotifyPanel
|
||||||
NotifyPanel.NotifyPanel(self, tl)
|
NotifyPanel.NotifyPanel(self, tl)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user