a925fe63fb
<SRS> SRS01 : Authentication </SRS> <Changes> - Set up DataStore singleton and added basic employee + log storage - Added LogService - Refactor InputHelper - Updated include paths in project config </Changes> <Review> Smitha Mohan </Review>
13 lines
345 B
C++
13 lines
345 B
C++
#include "LogService.h"
|
|
#include "Log.h"
|
|
#include "Factory.h"
|
|
#include "DataStore.h"
|
|
|
|
void LogService::log(const std::string& message)
|
|
{
|
|
DataStore& dataStore = DataStore::getInstance();
|
|
logMap& logs = dataStore.getLogs();
|
|
std::shared_ptr<Log> log = Factory::getObject<Log>(message);
|
|
logs.emplace(std::make_pair(log->getTimestamp(), log));
|
|
}
|