Login | Register
My pages Projects Community openCollabNet

Discussions > Commits > svn commit: r139 - trunk/repoguard/src/repoguard/core/logger.py

repoguard
Discussion topic

Back to topic list

svn commit: r139 - trunk/repoguard/src/repoguard/core/logger.py

Author schlauch
Full name Tobias Schlauch
Date 2012-10-07 08:48:18 PDT
Message Author: schlauch
Date: 2012-10-07 08:48:18-0700
New Revision: 139

Modified:
   trunk/repoguard/src/​repoguard/core/logge​r.py

Log:
Explicitly set the encoding of log files to the UTF-8 encoding.

Modified: trunk/repoguard/src/​repoguard/core/logge​r.py
Url: http://repoguard.tig​ris.org/source/brows​e/repoguard/trunk/re​poguard/src/repoguar​d/core/logger.py?vie​w=diff&pathrev=1​39&r1=138&r2​=139
====================​====================​====================​==================
--- trunk/repoguard/src/​repoguard/core/logge​r.py (original)
+++ trunk/repoguard/src/​repoguard/core/logge​r.py 2012-10-07 08:48:18-0700
@@ -88,7 +88,8 @@
         log_file_path = os.path.join(output_dir_path, name)
         max_bytes = long(cls._configurat​ion.get("max_bytes",​ "5242880"))
         backup_count = int(cls._configurati​on.get("backup_count​", "3"))
- handler = handlers.RotatingFil​eHandler(log_file_pa​th, maxBytes=max_bytes, backupCount=backup_count)
+ handler = handlers.RotatingFileHandler(
+ log_file_path, encoding="UTF-8", maxBytes=max_bytes, backupCount=backup_count)
         handler.setFormatter​(logging.Formatter(c​ls._MESSAGE_FORMAT))​
         handler.setLevel(log​ging.NOTSET)
         return handler

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r139 - trunk/repoguard/src/repoguard/core/logger.py schlauch Tobias Schlauch 2012-10-07 08:48:18 PDT
Messages per page: