comparison orpg/tools/orpg_log.py @ 95:af6bf998f425 alpha

Traipse Alpha 'OpenRPG' {090919-00} 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: 00: Adds menu changes to draw attention to important updates, errors, or other events. (image info coming soon) Traipse URL is not included in the repos tab and is set as default. 01: Fixes Copy for Windows and Linux (finally!!) users. Fixes incomplete update to Grid and List nodes. Fixes incomplete update to Chat Commands. 02: Fixes problems with Remote Image Upload. Fixes Drop and Drag of Minis to Map. CherryPy can now use any image in the webfiles/ folder and sub-folders. CherryPy can now Drop and Drag Minis to the Map. 03: Minor changes to Update Manager's GUI. Expert recommendation warning added to Revision Update. Step down compatibility with open_rpg & component added to orpgCore. 19-00: Better backwards compatibility in orpgCore. Using majority of 'Grumpy' network folder to correct server lag. 01: Build Number updated. 02: Fixes CherryPit misspelling. Makes Traipse Suite 'Attention' item portable, and executes it on 'Critical' debug notices. Adds incomplete Shift + Enter to Text Entry, currently creates a 'Critical' warning.
author sirebral
date Sat, 19 Sep 2009 12:19:17 -0500
parents bdbeafcb2ef4
children 496dbf12a6cb dcf4fbe09b70
comparison
equal deleted inserted replaced
91:ce5c76d49df0 95:af6bf998f425
52 for line in crash_report: msg += line 52 for line in crash_report: msg += line
53 logger.exception(msg) 53 logger.exception(msg)
54 crash_report.close() 54 crash_report.close()
55 logger.exception("Crash Report Created!!") 55 logger.exception("Crash Report Created!!")
56 logger.info("Printed out crash-report.txt in your System folder", True) 56 logger.info("Printed out crash-report.txt in your System folder", True)
57 #component.get('frame').traipseSuite.SetTitle('&Traipse!!')
58 component.get('frame').mainmenu.Replace(8, component.get('frame').traipseSuite, '&Traipse Suite!')
59 component.get('frame').debugConsole.SetBitmap(wx.Bitmap(dir_struct["icon"] + 'spotlight.png'))
60 component.get('frame').traipseSuite.RemoveItem(component.get('frame').debugConsole)
61 component.get('frame').traipseSuite.AppendItem(component.get('frame').debugConsole)
62 #wx.MessageBox('Crash Report Created!', 'System Failure')
63 57
64 class DebugConsole(wx.Frame): 58 class DebugConsole(wx.Frame):
65 def __init__(self, parent): 59 def __init__(self, parent):
66 super(DebugConsole, self).__init__(parent, -1, "Debug Window") 60 super(DebugConsole, self).__init__(parent, -1, "Debug Console")
67 icon = None 61 icon = None
68 icon = wx.Icon(dir_struct["icon"]+'note.ico', wx.BITMAP_TYPE_ICO) 62 icon = wx.Icon(dir_struct["icon"]+'note.ico', wx.BITMAP_TYPE_ICO)
69 self.SetIcon( icon ) 63 self.SetIcon( icon )
70 self.console = wx.TextCtrl(self, -1, style=wx.TE_MULTILINE | wx.TE_READONLY) 64 self.console = wx.TextCtrl(self, -1, style=wx.TE_MULTILINE | wx.TE_READONLY)
71 sizer = wx.BoxSizer(wx.VERTICAL) 65 sizer = wx.BoxSizer(wx.VERTICAL)
120 114
121 def general(self, msg, to_console=False): 115 def general(self, msg, to_console=False):
122 self.log(msg, ORPG_GENERAL, to_console) 116 self.log(msg, ORPG_GENERAL, to_console)
123 117
124 def exception(self, msg, to_console=True): 118 def exception(self, msg, to_console=True):
119 ### Beta ### Every 'Critical' exception will draw attention to the Debug Console
120 component.get('frame').TraipseSuiteWarn('debug')
125 self.log(msg, ORPG_CRITICAL, to_console) 121 self.log(msg, ORPG_CRITICAL, to_console)
126 122
127 def log(self, msg, log_type, to_console=False): 123 def log(self, msg, log_type, to_console=False):
128 if self.log_to_console or to_console or log_type == ORPG_CRITICAL: 124 if self.log_to_console or to_console or log_type == ORPG_CRITICAL:
129 try: self._io.line(str(msg), **self._lvl_args[log_type]['colorizer']) 125 try: self._io.line(str(msg), **self._lvl_args[log_type]['colorizer'])