projects
/
citadel.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
2b29a6bdf2a8d724042d788b46fb0839d37b48f7
[citadel.git]
/
citadel
/
logging.c
1
/*
2
* Everything which needs some logging...
3
* $Id$
4
*/
5
6
#include "sysdep.h"
7
#include <stdlib.h>
8
#include <unistd.h>
9
#include <stdio.h>
10
#include <fcntl.h>
11
#include <signal.h>
12
#include <time.h>
13
#include <ctype.h>
14
#include <string.h>
15
#include <errno.h>
16
#ifdef HAVE_PTHREAD_H
17
#include <pthread.h>
18
#endif
19
#include <syslog.h>
20
#include "citadel.h"
21
#include "server.h"
22
#include "logging.h"
23
24
25
void rec_log(unsigned int lrtype, char *name) {
26
FILE *fp;
27
time_t now;
28
29
time(&now);
30
fp = fopen("citadel.log", "a");
31
fprintf(fp, "%ld|%u|%s\n", (long)now, lrtype, name);
32
fclose(fp);
33
}