9de7305c11489f417978d2a3569ef5957583e454
[citadel.git] / citadel / logging.c
1 /*
2  * Everything which needs some logging...
3  */
4
5 #include <stdlib.h>
6 #include <unistd.h>
7 #include <stdio.h>
8 #include <fcntl.h>
9 #include <signal.h>
10 #include <time.h>
11 #include <ctype.h>
12 #include <string.h>
13 #include <errno.h>
14 #include <pthread.h>
15 #include <syslog.h>
16 #include "citadel.h"
17 #include "server.h"
18 #include "proto.h"
19
20
21 void rec_log(unsigned int lrtype, char *name) {
22         FILE *fp;
23         time_t now;
24
25         time(&now);
26         fp = fopen("citadel.log", "a");
27         fprintf(fp, "%ld|%u|%s\n", now, lrtype, name);
28         fclose(fp);
29         }