$Log$
+Revision 528.9 2005/01/14 21:03:17 ajc
+* A few logging hacks
+
Revision 528.8 2005/01/14 15:00:51 ajc
* Placed the navbar into the room banner, at least in its temporary form.
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
+
localtime_r(&event_tt, &event_tm);
}
-lprintf(9, "Event: %04d/%02d/%02d, Now: %04d/%02d/%02d\n",
- event_tm.tm_year,
- event_tm.tm_mon,
+lprintf(9, "Event: %04d-%s-%02d, Now: %04d-%s-%02d\n",
+ event_tm.tm_year + 1900,
+ ascmonths[event_tm.tm_mon],
event_tm.tm_mday,
- today_tm.tm_year,
- today_tm.tm_mon,
+ today_tm.tm_year + 1900,
+ ascmonths[today_tm.tm_mon],
today_tm.tm_mday);
-
if ((event_tm.tm_year == today_tm.tm_year)
&& (event_tm.tm_mon == today_tm.tm_mon)
&& (event_tm.tm_mday == today_tm.tm_mday)) {
* $Id$
*/
+/*
+ * Uncomment this to log all communications with the Citadel server
+ */
+#define SERV_TRACE 1
#include <ctype.h>
#include <stdlib.h>
} while ((ch != 10) && (ch != 0) && (len < (SIZ-1)));
if (strbuf[len-1] == 10) strbuf[--len] = 0;
if (strbuf[len-1] == 13) strbuf[--len] = 0;
- /* lprintf(9, ">%s\n", strbuf); */
+#ifdef SERV_TRACE
+ lprintf(9, ">%s\n", strbuf);
+#endif
}
{
char buf[SIZ];
+#ifdef SERV_TRACE
+ lprintf(9, "<%s\n", string);
+#endif
sprintf(buf, "%s\n", string);
serv_write(buf, strlen(buf));
}
strcat(buf, "\n");
serv_write(buf, strlen(buf));
- /* lprintf(9, "<%s", buf); */
+#ifdef SERV_TRACE
+ lprintf(9, "<%s", buf);
+#endif
}
void client_write_ssl(char *buf, int nbytes);
#endif
+extern char *ascmonths[];
/* Views (from citadel.h) */