comparison orpg/tools/orpg_log.py @ 10:5df1340bda13 grumpy-goblin

Big patch! Linux GUI, Fetching Dict., Init2, Streaming lining.
author sirebral
date Tue, 21 Jul 2009 17:19:53 -0500
parents 4385a7d0efd1
children 97265586402b
comparison
equal deleted inserted replaced
9:80ab434efc87 10:5df1340bda13
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