make filelogger log more similar to unixlogger

This commit is contained in:
ps 2011-01-19 00:24:31 +00:00
parent 240ec11ee0
commit 126d365cfe

View file

@ -20,6 +20,7 @@
#include "FileLogger.h"
extern Configfile cfg;
extern __thread unsigned long connection_id;
FileLogger::FileLogger():linecount(0)
{
@ -86,7 +87,7 @@ void FileLogger::addMessage(string file,int line,int loglevel,string logmessage)
{
openFile(cfg.getFileLoggerFilename());
if(NULL!=f)
fprintf(f,"%s: %s:%ld %s\n",Utils::rfc2821_date().c_str(),file.c_str(),long(line),logmessage.c_str());
fprintf(f,"%s: %s:%ld [%ld] %s\n",Utils::rfc2821_date().c_str(),file.c_str(),long(line),connection_id,logmessage.c_str());
}
if(++linecount>30)
{