Core/Common: Include cleanup

This commit is contained in:
Shauren
2017-05-11 22:29:51 +02:00
parent 8abc56c540
commit 3a418a0bbc
145 changed files with 1194 additions and 989 deletions

View File

@@ -16,27 +16,10 @@
*/
#include "Appender.h"
#include "Common.h"
#include "Util.h"
#include "LogMessage.h"
#include "StringFormat.h"
#include <utility>
#include <sstream>
std::string LogMessage::getTimeStr(time_t time)
{
tm aTm;
localtime_r(&time, &aTm);
char buf[20];
snprintf(buf, 20, "%04d-%02d-%02d_%02d:%02d:%02d", aTm.tm_year+1900, aTm.tm_mon+1, aTm.tm_mday, aTm.tm_hour, aTm.tm_min, aTm.tm_sec);
return std::string(buf);
}
std::string LogMessage::getTimeStr()
{
return getTimeStr(mtime);
}
Appender::Appender(uint8 _id, std::string const& _name, LogLevel _level /* = LOG_LEVEL_DISABLED */, AppenderFlags _flags /* = APPENDER_FLAGS_NONE */):
id(_id), name(_name), level(_level), flags(_flags) { }