# HG changeset patch # User Changaco # Date 1335220231 -7200 # Node ID 68a9b24a182a533b41debb03696ab3256212c7ca # Parent 5c26fc1adbacc8178c8ae00ba709bbbf9f2ed0ac encode log messages in UTF8 before passing them to syslog Signed-off-by: Changaco diff --git a/feed-push b/feed-push --- a/feed-push +++ b/feed-push @@ -62,8 +62,10 @@ def log(*args): priority = 7 - priority if priority < global_args.log_level: return + if isinstance(msg, unicode): + msg = msg.encode('utf8') if global_args.syslog: - syslog(*args) + syslog(priority, msg) else: sys.stderr.write(log_levels[priority]+': '+msg+'\n')