Closed Bug 839357 Opened 12 years ago Closed 12 years ago

bugmail syslog logging is throwing "Wide character in syswrite"

Categories

(bugzilla.mozilla.org :: General, defect)

Production
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: glob, Assigned: glob)

References

Details

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(); }
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
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.