summaryrefslogtreecommitdiffabout
path: root/src/binlog.c
authorSergey Poznyakoff <gray@gnu.org.ua>2013-10-13 09:13:46 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2013-10-13 09:13:46 (GMT)
commit510fc646f13b843d046323e3477edb6c1bc2258d (patch) (side-by-side diff)
tree3de9ea346897300e00ef169fcc84ab508b3d70a3 /src/binlog.c
parentfcc1c011757f71bb3ec1c883a19c1945fd83cf11 (diff)
downloadvmod-binlog-510fc646f13b843d046323e3477edb6c1bc2258d.tar.gz
vmod-binlog-510fc646f13b843d046323e3477edb6c1bc2258d.tar.bz2
Improve error reporting.
* src/pack.c: Use packerror to report errors. * src/pack.h (packerror): New proto. * src/binlog.c (packerror): New function. * src/binlogcat.c (packerror,error,verror): New functions.
Diffstat (limited to 'src/binlog.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/binlog.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/binlog.c b/src/binlog.c
index 325f337..7e88817 100644
--- a/src/binlog.c
+++ b/src/binlog.c
@@ -24,6 +24,7 @@
#include <syslog.h>
#include <stddef.h>
#include <stdlib.h>
+#include <stdarg.h>
#include <ctype.h>
#include <time.h>
#include "vrt.h"
@@ -91,7 +92,17 @@ binlog_debug(const char *fmt, ...)
}
#define debug(c,l,s) do { if ((c)->debug>=(l)) binlog_debug s; } while(0)
+
+void
+packerror(const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ vsyslog(LOG_DAEMON|LOG_NOTICE, fmt, ap);
+ va_end(ap);
+}
+
int
module_init(struct vmod_priv *priv, const struct VCL_conf *vclconf)
{

Return to:

Send suggestions and report system problems to the System administrator.