20 lines
466 B
C++
20 lines
466 B
C++
/*
|
|
* File: Log.cpp
|
|
* Description: Handle operations related to logging
|
|
* Author: Trenser
|
|
* Created: 01-Apr-2026
|
|
*/
|
|
|
|
#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));
|
|
}
|