comparison orpg/tools/orpg_log.py @ 127:0f720618a8bd alpha

Traipse Alpha 'OpenRPG' {091002-01} Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc's main goal is to offer more advanced features and enhance the productivity of the user. Update Summary (Cleaning up for Beta) Added Bookmarks Fix to Remote Admin Commands Minor fix to text based Server Fix to Pretty Print, from Core Fix to Splitter Nodes not being created Fix to massive amounts of images loading, from Core Added 'boot' command to remote admin Added confirmation window for sent nodes Minor changes to allow for portability to an OpenSUSE linux OS Miniatures Layer pop up box allows users to turn off Mini labels, from FlexiRPG Zoom Mouse plugin added Images added to Plugin UI Switching to Element Tree Map efficiency, from FlexiRPG Added Status Bar to Update Manager default_manifest.xml renamed to default_upmana.xml Cleaner clode for saved repositories New TrueDebug Class in orpg_log (See documentation for usage) Mercurial's hgweb folder is ported to upmana Happy Halloween!
author sirebral
date Mon, 02 Nov 2009 19:20:46 -0600
parents 8827271fbe1b
children fba298d65cf8
comparison
equal deleted inserted replaced
126:e7f990be5075 127:0f720618a8bd
72 This feature can be modified to trace deeper and find the bugs faster, ending the puzzle box.""" 72 This feature can be modified to trace deeper and find the bugs faster, ending the puzzle box."""
73 def __init__(self, objects=None, locale=False, log=True, parents=False): 73 def __init__(self, objects=None, locale=False, log=True, parents=False):
74 if log == False: return 74 if log == False: return
75 current = inspect.currentframe() 75 current = inspect.currentframe()
76 if parents: self.get_parents(current) 76 if parents: self.get_parents(current)
77 self.true_debug(current, objects, locale) 77 else: self.true_debug(current, objects, locale)
78 78
79 def true_debug(self, current, objects, locale): 79 def true_debug(self, current, objects, locale):
80 debug_string = 'Function: ' + str(inspect.getouterframes(current)[1][3]) 80 debug_string = 'Function: ' + str(inspect.getouterframes(current)[1][3])
81 #if locale == 'all': print inspect.getouterframes(current)[4]; return 81 #if locale == 'all': print inspect.getouterframes(current)[4]; return
82 if objects != None: debug_string += ' Objects: ' + str(objects) 82 if objects != None: debug_string += ' Objects: ' + str(objects)
83 if locale: debug_string += ' File: ' + str(inspect.getouterframes(current)[1][1]) 83 if locale: debug_string += ' File: ' + str(inspect.getouterframes(current)[1][1])
84 print debug_string 84 logger.debug(debug_string)
85 return 85 return
86 86
87 def get_parents(self, current): 87 def get_parents(self, current):
88 debug_string = 'Function: ' + str(inspect.getouterframes(current)[1][3]) + ' Parents:' 88 debug_string = 'Function: ' + str(inspect.getouterframes(current)[1][3]) + ' Parents:'
89 family = list(inspect.getouterframes(current)) 89 family = list(inspect.getouterframes(current))
90 for parent in family: 90 for parent in family:
91 debug_string += ' ' + str(parent[4]) 91 debug_string += ' ' + str(parent[4])
92 print debug_string 92 logger(debug_string)
93 return 93 return
94 94
95 class DebugConsole(wx.Frame): 95 class DebugConsole(wx.Frame):
96 def __init__(self, parent): 96 def __init__(self, parent):
97 super(DebugConsole, self).__init__(parent, -1, "Debug Console") 97 super(DebugConsole, self).__init__(parent, -1, "Debug Console")