summaryrefslogtreecommitdiffstats
path: root/src/Net/Packets/LogPacket.cpp
diff options
context:
space:
mode:
authorJohannes Thorn <dante@g4t3.de>2008-09-28 00:35:16 +0200
committerJohannes Thorn <dante@g4t3.de>2008-09-28 00:35:16 +0200
commit29d723d82834a30557136f7585254eaf3673ce69 (patch)
tree2a6fa6686a709bc205036288c8f6c75cdccc050f /src/Net/Packets/LogPacket.cpp
parent37b452c361d99ca809c699b6968df3723f0cadb9 (diff)
downloadmad-29d723d82834a30557136f7585254eaf3673ce69.tar
mad-29d723d82834a30557136f7585254eaf3673ce69.zip
Logger gr?ndlich ?berarbeitet und den Networklogger um Timestamp erweitert.
Diffstat (limited to 'src/Net/Packets/LogPacket.cpp')
-rw-r--r--src/Net/Packets/LogPacket.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Net/Packets/LogPacket.cpp b/src/Net/Packets/LogPacket.cpp
index 97994b0..fbe59cd 100644
--- a/src/Net/Packets/LogPacket.cpp
+++ b/src/Net/Packets/LogPacket.cpp
@@ -18,12 +18,13 @@
*/
#include "LogPacket.h"
+#include <ctime>
namespace Mad {
namespace Net {
namespace Packets {
-LogPacket::LogPacket(Type type, uint16_t requestId, Common::Logger::MessageCategory category, Common::Logger::MessageLevel level, const std::string &message)
+LogPacket::LogPacket(Type type, uint16_t requestId, Common::Logger::MessageCategory category, Common::Logger::MessageLevel level, time_t messageTimestamp, const std::string &message)
: Packet(type, requestId)
{
setLength(sizeof(LogData) + message.length());
@@ -31,6 +32,7 @@ LogPacket::LogPacket(Type type, uint16_t requestId, Common::Logger::MessageCateg
logData->category = htons(category);
logData->level = htons(level);
+ logData->messageTimestamp = htons(messageTimestamp);
std::memcpy(logData->message, message.c_str(), message.length());
}