aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2016-01-21 07:32:55 +0000
committerSimon McVittie <smcv@debian.org>2016-01-21 07:33:41 +0000
commit02a1aa4e49e7d459edd12621046bd35259036ae7 (patch)
tree9ae0c6059274fc2083a0f99cf1de3a6a2800cdfe /IkiWiki.pm
parentb8dbb48fdce9ffc00d1f3f4267948ee2875d2970 (diff)
downloadikiwiki-02a1aa4e49e7d459edd12621046bd35259036ae7.tar
ikiwiki-02a1aa4e49e7d459edd12621046bd35259036ae7.tar.gz
Don't fail to syslog if the wiki name contains %s
This is a corner case spotted while fixing UTF-8 syslogging.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm7
1 files changed, 2 insertions, 5 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 97fe6b8ff..0f27ac419 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -843,12 +843,9 @@ sub log_message ($$) {
$log_open=1;
}
eval {
- # keep a copy to avoid editing the original config repeatedly
- my $wikiname = $config{wikiname};
- utf8::encode($wikiname);
- my $message = join(" ", @_);
+ my $message = "[$config{wikiname}] ".join(" ", @_);
utf8::encode($message);
- Sys::Syslog::syslog($type, "[$wikiname] %s", $message);
+ Sys::Syslog::syslog($type, "%s", $message);
};
if ($@) {
print STDERR "failed to syslog: $@" unless $log_failed;