]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/log.cpp
added items to the tavern.dat, added the filename option to the config file
[irc/gameservirc.git] / gameserv / log.cpp
index a1e9ec765dbd0a8266a3ddfe16dd02c11305b22c..3606b9a4ca93beda14cee9a813006a95202c43c5 100644 (file)
@@ -1,7 +1,12 @@
 #include "extern.h"
 #include <cctype>
 #include <stdio.h>
-#include <fstream.h>
+#include <fstream>
+
+using std::endl;
+using std::cerr;
+using std::ofstream;
+using std::ios;
 
 void log(const char *fmt, ...)
 {
@@ -12,7 +17,7 @@ void log(const char *fmt, ...)
     char *ts, *output;
     const char *t = fmt;
 
-    ts = new char[32];
+    ts = new char[64];
     output = new char[4096];
 
     outfile.open("gameserv.log", ios::out | ios::app);
@@ -27,7 +32,7 @@ void log(const char *fmt, ...)
     time_t ti;
     time(&ti);
     tm = localtime(&ti);
-    strftime(ts, 32, "%Y%m%d", tm);
+    strftime(ts, 64, "%m/%d/%Y %H:%M:%S", tm);
 
     sprintf(output, "[%s]: ", ts);