X-Git-Url: https://jfr.im/git/irc/gameservirc.git/blobdiff_plain/9f8c2accae45b8dcb8c4e26009230c5e87ed53b5..c7bceafda9c7c1045b398d8454a0a2ed0fbd9170:/gameserv/log.cpp diff --git a/gameserv/log.cpp b/gameserv/log.cpp index a1e9ec7..3606b9a 100644 --- a/gameserv/log.cpp +++ b/gameserv/log.cpp @@ -1,7 +1,12 @@ #include "extern.h" #include #include -#include +#include + +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);