Changeset 2515

Show
Ignore:
Timestamp:
11/19/08 11:37:33 (7 weeks ago)
Author:
bzr
Message:

logHandler: Don't specify an encoding when creating the logging FileHandler?. This works around a bug in Python 2.6's logging module. Fixes UnicodeDecodeErrors? when logging unicode text.

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk

    • Property bzr:revision-info
      •  

        old new  
        1 timestamp: 2008-11-19 10:29:03.690000057 +1000 
         1timestamp: 2008-11-19 21:36:20.410000086 +1000 
        22committer: James Teh <jamie@jantrid.net> 
        33properties:  
    • Property bzr:revision-id:v3-list-QlpoOTFBWSZTWbrL2vUAAB1VgAAQABCAQDrrnqAgAFCgaaGRkxBoTIJ6mmaNRwhndFAoNhZjh_YY4a01fOg1ulgNNC2UrzPdXXEnDpX8XckU4UJC6y9r1A..
      •  

        old new  
        2842842312 peter.v@datagate.sk-20081118213251-tb3mozki0dlndqdd 
        2852852313 jamie@jantrid.net-20081119002903-qad2w6vrs43u1x09 
         2862314 jamie@jantrid.net-20081119113620-dz3izx839k8dy7z0 
    • Property bzr:file-ids
      •  

        old new  
        1 source/pythonConsole.py pythonconsole.py-20080403145126-btxkiuauiefll29c-1 
         1source/logHandler.py    1366@dbe06fc7-9119-0410-a01d-9dbf589ecbba:trunk:source%2FlogObj.py 
  • trunk/source/logHandler.py

    r2256 r2515  
    155155        logging.addLevelName(Logger.DEBUGWARNING, "DEBUGWARNING") 
    156156        logging.addLevelName(Logger.IO, "IO") 
    157         logHandler = FileHandler(globalVars.appArgs.logFileName, "w", "UTF-8") 
     157        # HACK: Don't specify an encoding, as a bug in Python 2.6's logging module causes problems if we do. 
     158        logHandler = FileHandler(globalVars.appArgs.logFileName, "w") 
    158159        logFormatter=logging.Formatter("%(levelname)s - %(codepath)s (%(asctime)s):\n%(message)s", "%H:%M:%S") 
    159160        logHandler.setFormatter(logFormatter)