mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-21 22:51:34 -04:00
changed debugCall and debugStateCall
This commit is contained in:
parent
03c13618e2
commit
35fac86d24
@ -213,6 +213,7 @@ class Notifier:
|
|||||||
call followed by the [fsm state] notifier category and
|
call followed by the [fsm state] notifier category and
|
||||||
the function call (with parameters).
|
the function call (with parameters).
|
||||||
"""
|
"""
|
||||||
|
#f.f_locals['self'].__init__.im_class.__name__
|
||||||
if (self.__debug):
|
if (self.__debug):
|
||||||
state = ''
|
state = ''
|
||||||
doId = ''
|
doId = ''
|
||||||
@ -234,20 +235,18 @@ class Notifier:
|
|||||||
|
|
||||||
if hasattr(obj, 'doId'):
|
if hasattr(obj, 'doId'):
|
||||||
doId = " doId:%s"%(obj.doId,)
|
doId = " doId:%s"%(obj.doId,)
|
||||||
if 1 or type(obj) == types.ClassType:
|
#if type(obj) == types.ClassType:
|
||||||
name = "%s."%(obj.__class__.__name__,)
|
# name = "%s."%(obj.__class__.__name__,)
|
||||||
else:
|
string = ":%s:%s [%-7s] id(%s)%s %s"%(
|
||||||
name = "%s "%(self.__name,)
|
|
||||||
string = ":%s [%-7s]%s %s %s%s"%(
|
|
||||||
self.getOnlyTime(),
|
self.getOnlyTime(),
|
||||||
|
self.__name,
|
||||||
state,
|
state,
|
||||||
doId,
|
|
||||||
id(obj),
|
id(obj),
|
||||||
name,
|
doId,
|
||||||
PythonUtil.traceParentCall())
|
PythonUtil.traceParentCall())
|
||||||
self.__log(string)
|
self.__log(string)
|
||||||
self.__print(string)
|
self.__print(string)
|
||||||
return 1 # to allow assert(myNotify.debug("blah"))
|
return 1 # to allow assert self.notify.debugStateCall(self)
|
||||||
|
|
||||||
def debugCall(self, debugString=''):
|
def debugCall(self, debugString=''):
|
||||||
"""
|
"""
|
||||||
@ -256,12 +255,12 @@ class Notifier:
|
|||||||
the function call (with parameters).
|
the function call (with parameters).
|
||||||
"""
|
"""
|
||||||
if (self.__debug):
|
if (self.__debug):
|
||||||
string = ":%s %s %s.%s"%(
|
string = ":%s:%s \"%s\" %s"%(
|
||||||
self.getOnlyTime(),
|
self.getOnlyTime(),
|
||||||
debugString,
|
|
||||||
self.__name,
|
self.__name,
|
||||||
|
debugString,
|
||||||
PythonUtil.traceParentCall())
|
PythonUtil.traceParentCall())
|
||||||
self.__log(string)
|
self.__log(string)
|
||||||
self.__print(string)
|
self.__print(string)
|
||||||
return 1 # to allow assert(myNotify.debug("blah"))
|
return 1 # to allow assert self.notify.debugCall("blah")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user