* Changed the comments at the beginning of each file to a consistent format
[citadel.git] / citadel / logging.c
1 /*
2  * $Id$
3  *
4  * Everything which needs some logging...
5  *
6  */
7
8 #include "sysdep.h"
9 #include <stdlib.h>
10 #include <unistd.h>
11 #include <stdio.h>
12 #include <fcntl.h>
13 #include <signal.h>
14 #include <time.h>
15 #include <ctype.h>
16 #include <string.h>
17 #include <errno.h>
18 #include <syslog.h>
19 #include "citadel.h"
20 #include "server.h"
21 #include "logging.h"
22
23
24 void rec_log(unsigned int lrtype, char *name) {
25         FILE *fp;
26         time_t now;
27
28         time(&now);
29         fp = fopen("citadel.log", "a");
30         if (fp != NULL) {
31                 fprintf(fp, "%ld|%u|%s\n", (long)now, lrtype, name);
32                 fclose(fp);
33         }
34 }