mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Transition to json to binary data transfers
This commit is contained in:
@@ -3,4 +3,4 @@
|
||||
|
||||
void DllExport log(const std::string& sMessage);
|
||||
void DllExport log(const std::wstring& sMessage);
|
||||
void DllExport getLogsJSON(json::value& json, int logsNumber = NULL);
|
||||
void DllExport getLogsJSON(json::value& json, unsigned int logsNumber = NULL);
|
||||
|
||||
@@ -7,7 +7,7 @@ class Logger
|
||||
public:
|
||||
void log(const string& sMessage);
|
||||
void log(const wstring& sMessage);
|
||||
void toJSON(json::value& json, int logsNumber = NULL);
|
||||
void toJSON(json::value& json, unsigned int logsNumber = NULL);
|
||||
|
||||
static Logger* GetLogger();
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ void log(const wstring& message)
|
||||
LOGGER->log(message);
|
||||
}
|
||||
|
||||
void getLogsJSON(json::value& json, int logsNumber)
|
||||
void getLogsJSON(json::value& json, unsigned int logsNumber)
|
||||
{
|
||||
LOGGER->toJSON(json, logsNumber);
|
||||
}
|
||||
@@ -32,10 +32,10 @@ void Logger::Close()
|
||||
m_Logfile.close();
|
||||
}
|
||||
|
||||
void Logger::toJSON(json::value& json, int logsNumber)
|
||||
void Logger::toJSON(json::value& json, unsigned int logsNumber)
|
||||
{
|
||||
lock_guard<mutex> guard(mutexLock);
|
||||
int i = 0;
|
||||
unsigned int i = 0;
|
||||
for (auto itr = m_logs.end(); itr != m_logs.begin(); --itr)
|
||||
{
|
||||
json[to_wstring(m_logs.size() - 1 - i)] = json::value::string(to_wstring(*itr));
|
||||
|
||||
Reference in New Issue
Block a user