chiark
/
gitweb
/
~ian
/
secnet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
logging: provide vslilog as well as slilog
[secnet.git]
/
log.c
diff --git
a/log.c
b/log.c
index c2da4af09b3713dd6d0ec6835d65676538b5e4f3..f4ef8000605c866121031ecb4babf2965c2aa1ff 100644
(file)
--- a/
log.c
+++ b/
log.c
@@
-8,6
+8,7
@@
#include <assert.h>
#include <unistd.h>
#include "process.h"
#include <assert.h>
#include <unistd.h>
#include "process.h"
+#include "util.h"
bool_t secnet_is_daemon=False;
uint32_t message_level=M_WARNING|M_ERR|M_SECURITY|M_FATAL;
bool_t secnet_is_daemon=False;
uint32_t message_level=M_WARNING|M_ERR|M_SECURITY|M_FATAL;
@@
-28,7
+29,7
@@
static void vMessage(uint32_t class, const char *message, va_list args)
/* Each line is sent separately */
while ((nlp=strchr(buff,'\n'))) {
*nlp=0;
/* Each line is sent separately */
while ((nlp=strchr(buff,'\n'))) {
*nlp=0;
- log(system_log,class,buff);
+
sli
log(system_log,class,buff);
memmove(buff,nlp+1,strlen(nlp+1)+1);
}
} else {
memmove(buff,nlp+1,strlen(nlp+1)+1);
}
} else {
@@
-554,7
+555,6
@@
void log_from_fd(int fd, cstring_t prefix, struct log_if *log)
prefix);
}
prefix);
}
-init_module log_module;
void log_module(dict_t *dict)
{
add_closure(dict,"logfile",logfile_apply);
void log_module(dict_t *dict)
{
add_closure(dict,"logfile",logfile_apply);