[XSwiftBus] Add timestamp for logger

This commit is contained in:
Klaus Basan
2020-03-05 17:56:07 +01:00
committed by Mat Sutcliffe
parent 99033f8538
commit 3174e15b53

View File

@@ -13,6 +13,7 @@
#endif #endif
#include "utils.h" #include "utils.h"
#include <XPMPMultiplayer.h>
#include <XPMPMultiplayerCSL.h> #include <XPMPMultiplayerCSL.h>
#include <XPLM/XPLMUtilities.h> #include <XPLM/XPLMUtilities.h>
#include <XPLM/XPLMPlugin.h> #include <XPLM/XPLMPlugin.h>
@@ -51,7 +52,7 @@ namespace XSwiftBus
assert(!filePath.empty()); assert(!filePath.empty());
std::ostringstream ss; std::ostringstream ss;
ss << "xswiftbus: "; ss << XPMPTimestamp() << "xswiftbus: ";
#if defined(XSWIFTBUS_ENABLE_TRACE_LOG) #if defined(XSWIFTBUS_ENABLE_TRACE_LOG)
switch (type) switch (type)
@@ -90,7 +91,7 @@ namespace XSwiftBus
ss << message; ss << message;
ss << "\n"; ss << "\n";
std::string buffer = ss.str(); const std::string buffer = ss.str();
XPLMDebugString(buffer.c_str()); XPLMDebugString(buffer.c_str());
} }
} }