cyrus-imapd/patch-cassandane-no-syslog

58 lines
1.4 KiB
Plaintext
Raw Normal View History

2017-05-25 15:33:34 +00:00
diff --git a/Cassandane/Util/Log.pm b/Cassandane/Util/Log.pm
index a44005c..5bb5710 100644
2017-05-25 15:33:34 +00:00
--- a/Cassandane/Util/Log.pm
+++ b/Cassandane/Util/Log.pm
2020-09-04 05:30:07 +00:00
@@ -51,9 +51,6 @@ our @EXPORT = qw(
2017-05-25 15:33:34 +00:00
my $verbose = 0;
-openlog('cassandane', '', LOG_LOCAL6)
- or die "Cannot openlog";
-
sub xlog
{
2020-09-04 05:30:07 +00:00
my $id;
@@ -87,7 +84,6 @@ sub xlog
else {
print STDERR "$msg\n";
}
2017-05-25 15:33:34 +00:00
- syslog(LOG_ERR, "$msg");
}
sub set_verbose
diff --git a/utils/syslog.c b/utils/syslog.c
index 20d3763..0238d82 100644
--- a/utils/syslog.c
+++ b/utils/syslog.c
@@ -116,14 +116,28 @@ EXPORTED void syslog(int priority, const char *format, ...)
va_start(ap, format);
fake_vsyslog(priority, format, ap);
va_end(ap);
+}
+
+EXPORTED void
+__attribute__((format(printf, 3, 4)))
+__syslog_chk(int priority, int whatever __attribute__((unused)),
+ const char *format, ...)
+{
+ va_list ap;
va_start(ap, format);
- real_vsyslog(priority, format, ap);
+ fake_vsyslog(priority, format, ap);
va_end(ap);
}
EXPORTED void vsyslog(int priority, const char *format, va_list ap)
{
fake_vsyslog(priority, format, ap);
- real_vsyslog(priority, format, ap);
+}
+
+EXPORTED void
+__attribute__((format(printf, 3, 0)))
+__vsyslog_chk(int priority, int whatever __attribute__((unused)), const char *format, va_list ap)
+{
+ fake_vsyslog(priority, format, ap);
}