parent
a8951de19e
commit
b8dbb48fdc
|
@ -846,7 +846,9 @@ sub log_message ($$) {
|
|||
# keep a copy to avoid editing the original config repeatedly
|
||||
my $wikiname = $config{wikiname};
|
||||
utf8::encode($wikiname);
|
||||
Sys::Syslog::syslog($type, "[$wikiname] %s", join(" ", @_));
|
||||
my $message = join(" ", @_);
|
||||
utf8::encode($message);
|
||||
Sys::Syslog::syslog($type, "[$wikiname] %s", $message);
|
||||
};
|
||||
if ($@) {
|
||||
print STDERR "failed to syslog: $@" unless $log_failed;
|
||||
|
|
|
@ -12,7 +12,7 @@ $IkiWiki::config{syslog} = 1;
|
|||
$IkiWiki::config{wikiname} = 'ASCII';
|
||||
is(debug('test'), '', 'plain ASCII syslog');
|
||||
$IkiWiki::config{wikiname} = 'not ⒶSCII';
|
||||
is(debug('test'), '', 'UTF8 syslog');
|
||||
is(debug('𝗧ĕṡҭ'), '', 'UTF8 syslog');
|
||||
my $orig = $IkiWiki::config{wikiname};
|
||||
is(debug('test'), '', 'check for idempotency');
|
||||
is($IkiWiki::config{wikiname}, $orig, 'unchanged config');
|
||||
|
|
Loading…
Reference in New Issue