The default bug view has changed. See this FAQ.

bugmail syslog logging is throwing "Wide character in syswrite"

RESOLVED FIXED

Status

()

bugzilla.mozilla.org
General
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: glob, Assigned: glob)

Tracking

Production
x86
Mac OS X

Details

(Assignee)

Description

4 years ago
from bug 836213 comment 4

Wide character in syswrite at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/Sys/Syslog.pm line 765. at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/Sys/Syslog.pm line 765 Sys::Syslog::_syslog_send_socket('<165>Feb 7 05:22:55 apache[2970]: [bugma 

From my understanding of the docs (and I should have seen this before when doing the review :() we need to encode_utf8 instead of decode_utf8 as syslog needs the characters in bytestream (binary) format or octets. So maybe we just need to make one simple change?

@@ -962,7 +960,7 @@
     $subject =~ s/[\[\(]Bug \d+[\]\)]\s*//;
 
     openlog('apache', 'cons,pid', 'local4');
-    syslog('notice', decode_utf8("[bugmail] $recipient ($message_type) $bug_id $subject"));
+    syslog('notice', encode_utf8("[bugmail] $recipient ($message_type) $bug_id $subject"));
     closelog();
 }
http://london.pm.org/pipermail/london.pm/Week-of-Mon-20071210/011804.html
(Assignee)

Comment 2

4 years ago
indeed!

Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.2/
modified extensions/BMO/Extension.pm
Committed revision 8650.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.