summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-18 14:38:17 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-18 14:38:17 +0200
commit032b9c1f64691e868b14e6d271ebfc2d093b0c66 (patch)
tree96a2612e3c46bb0266c44fec442c244e99fcf8d7 /runtime
parentfd6c3bc36a5a32f873299f7ae2dfc184e6e3c658 (diff)
parent08a4fc4ae56f29cc21c997488291f49b83fd1102 (diff)
downloadrsyslog-032b9c1f64691e868b14e6d271ebfc2d093b0c66.tar.gz
rsyslog-032b9c1f64691e868b14e6d271ebfc2d093b0c66.tar.xz
rsyslog-032b9c1f64691e868b14e6d271ebfc2d093b0c66.zip
Merge branch 'master' into tls
Diffstat (limited to 'runtime')
-rw-r--r--runtime/rsyslog.c13
-rw-r--r--runtime/rsyslog.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/runtime/rsyslog.c b/runtime/rsyslog.c
index 95ac23ef..c05119d8 100644
--- a/runtime/rsyslog.c
+++ b/runtime/rsyslog.c
@@ -103,6 +103,19 @@ static rsRetVal dfltErrLogger(uchar *errMsg)
}
+/* set the error log function
+ * rgerhards, 2008-04-18
+ */
+rsRetVal
+rsrtSetErrLogger(rsRetVal (*errLogger)(uchar*))
+{
+ DEFiRet;
+ assert(errLogger != NULL);
+ glblErrLogger = errLogger;
+ RETiRet;
+}
+
+
/* globally initialze the runtime system
* NOTE: this is NOT thread safe and must not be called concurrently. If that
* ever poses a problem, we may use proper mutex calls - not considered needed yet.
diff --git a/runtime/rsyslog.h b/runtime/rsyslog.h
index ad2a543a..61ddd3d9 100644
--- a/runtime/rsyslog.h
+++ b/runtime/rsyslog.h
@@ -314,6 +314,7 @@ extern rsRetVal (*glblErrLogger)(uchar*);
rsRetVal rsrtInit(char **ppErrObj, obj_if_t *pObjIF);
rsRetVal rsrtExit(void);
int rsrtIsInit(void);
+rsRetVal rsrtSetErrLogger(rsRetVal (*errLogger)(uchar*));
#endif /* multi-include protection */
/* vim:set ai: