Ticket #2007: 0001-fix-unicode-error-in-logger.patch

File 0001-fix-unicode-error-in-logger.patch, 998 bytes (added by non7top, 9 years ago)
  • deluge/log.py

    From 5cdd76dbd4bbbd916fb6809e6678fce7fa8a4766 Mon Sep 17 00:00:00 2001
    From: Vladimir Berezhnoy <non7top@gmail.com>
    Date: Sun, 19 Feb 2012 23:31:17 +0400
    Subject: [PATCH] fix unicode error in logger
    
    ---
     deluge/log.py |    3 +--
     1 files changed, 1 insertions(+), 2 deletions(-)
    
    diff --git a/deluge/log.py b/deluge/log.py
    index b66a6fa..769653c 100644
    a b def setupLogger(level="error", filename=None, filemode="w"): 
    154154            filename, filemode, 
    155155            maxBytes=50*1024*1024,   # 50 Mb 
    156156            backupCount=3, 
    157             encoding='utf-8', 
    158157            delay=0 
    159158        ) 
    160159    elif filename and filemode=='w': 
    161160        import logging.handlers 
    162161        handler = getattr( 
    163162            logging.handlers, 'WatchedFileHandler', logging.FileHandler)( 
    164                 filename, filemode, 'utf-8', delay=0 
     163                filename, filemode, delay=0 
    165164        ) 
    166165    else: 
    167166        handler = logging.StreamHandler()