X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d084d9ae9f7bcd7f7d1926e7eeae921dbad49273..80270bc96f3fd1d1f14b3ef539b73ad2eb0017de:/projects/traffcounter/logger.cpp diff --git a/projects/traffcounter/logger.cpp b/projects/traffcounter/logger.cpp deleted file mode 100644 index 0352d05b..00000000 --- a/projects/traffcounter/logger.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include -#include - -#include - -#include "logger.h" - -using namespace std; - -STGLogger::~STGLogger() -{ -} - -ostream & STGLogger::operator <<(const string & val) -{ - LogDate(); - out << " " << val; - return out; -} - -void STGLogger::LogDate() -{ - time_t t(time(NULL)); - struct tm * tt = localtime(&t); - out << "[" << tt->tm_year + 1900 << "-"; - out << (tt->tm_mon + 1 < 10 ? "0" : "") << tt->tm_mon + 1 << "-"; - out << (tt->tm_mday < 10 ? "0" : "") << tt->tm_mday << " "; - out << (tt->tm_hour < 10 ? "0" : "") << tt->tm_hour << ":"; - out << (tt->tm_min < 10 ? "0" : "") << tt->tm_min << ":"; - out << (tt->tm_sec < 10 ? "0" : "") << tt->tm_sec << "]"; -}