projects
/
citadel.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
* Removed all of the thread cancellation cruft that is no longer necessary
[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
#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", (long)now, lrtype, name);
29
fclose(fp);
30
}