comparison orpg/tools/orpg_log.py @ 15:cab94a90f9dc traipse_dev

Added 1.8.0 fix to log. Fixed problem with images that do not load the first time. Problem was in the fetching dict. del path instead.
author sirebral
date Tue, 21 Jul 2009 02:34:21 -0500
parents 4385a7d0efd1
children c54768cffbd4
comparison
equal deleted inserted replaced
14:0b8b7e3ed78d 15:cab94a90f9dc
36 36
37 def log(self, msg, type, to_consol=False): 37 def log(self, msg, type, to_consol=False):
38 if self.logToConsol or to_consol or type == ORPG_CRITICAL: 38 if self.logToConsol or to_consol or type == ORPG_CRITICAL:
39 print msg 39 print msg
40 40
41 if type & self.logLevel: 41 if type & self.logLevel or to_consol:
42 #if type & self.logLevel or to_consol: #Arbitrary removal TaS.
43 logMsg = time.strftime( '[%x %X] ', time.localtime( time.time() ) ) + msg + "\n" 42 logMsg = time.strftime( '[%x %X] ', time.localtime( time.time() ) ) + msg + "\n"
44 logFile = open(self.logName, "a") 43 logFile = open(self.logName, "a")
45 logFile.write(logMsg) 44 logFile.write(logMsg)
46 logFile.close() 45 logFile.close()
47 46