4 * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
9 static char rcsid[] = "$Id$";
13 * Revision 1.1 2008/02/14 12:14:50 james
14 * *** empty log message ***
27 flog_log (Log * _l, char *buf)
29 File_Log *l = (File_Log *) _l;
30 struct timeval tv = { 0 };
33 static const char *days[] = { "Sun", "Mon", "Tue",
34 "Wed", "Thu", "Fri", "Sat"
36 static const char *months[] = {
37 "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct",
44 gettimeofday (&tv, NULL);
48 fprintf (l->fp, "%s %2d %02d:%02d:%02d.%06d ", months[tm->tm_mon],
49 tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, tv.tv_usec);
59 File_Log *l = (File_Log *) _l;
66 file_log_new (char *fn)
75 l = malloc (sizeof (File_Log));
78 l->close = flog_close;