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