summaryrefslogtreecommitdiffstats
path: root/src/Daemon/Requests
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/Daemon/Requests
parent37b452c361d99ca809c699b6968df3723f0cadb9 (diff)
downloadmad-29d723d82834a30557136f7585254eaf3673ce69.tar
mad-29d723d82834a30557136f7585254eaf3673ce69.zip
Logger gr?ndlich ?berarbeitet und den Networklogger um Timestamp erweitert.
Diffstat (limited to 'src/Daemon/Requests')
-rw-r--r--src/Daemon/Requests/LogRequest.cpp2
-rw-r--r--src/Daemon/Requests/LogRequest.h6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/Daemon/Requests/LogRequest.cpp b/src/Daemon/Requests/LogRequest.cpp
index 62115cc..3a04284 100644
--- a/src/Daemon/Requests/LogRequest.cpp
+++ b/src/Daemon/Requests/LogRequest.cpp
@@ -26,7 +26,7 @@ namespace Daemon {
namespace Requests {
void LogRequest::sendRequest(Net::Connection *connection, uint16_t requestId) {
- connection->send(Net::Packets::LogPacket(Net::Packet::LOG, requestId, category, level, message));
+ connection->send(Net::Packets::LogPacket(Net::Packet::LOG, requestId, category, level, messageTimestamp, message));
}
void LogRequest::handlePacket(Net::Connection*, const Net::Packet &packet) {
diff --git a/src/Daemon/Requests/LogRequest.h b/src/Daemon/Requests/LogRequest.h
index a0a2e44..8d3798a 100644
--- a/src/Daemon/Requests/LogRequest.h
+++ b/src/Daemon/Requests/LogRequest.h
@@ -22,6 +22,7 @@
#include <Common/Request.h>
#include <Common/Logger.h>
+#include <ctime>
namespace Mad {
namespace Daemon {
@@ -31,6 +32,7 @@ class LogRequest : public Common::Request<> {
private:
Common::Logger::MessageCategory category;
Common::Logger::MessageLevel level;
+ time_t messageTimestamp;
std::string message;
protected:
@@ -38,8 +40,8 @@ class LogRequest : public Common::Request<> {
virtual void handlePacket(Net::Connection*, const Net::Packet &packet);
public:
- LogRequest(Common::Logger::MessageCategory category0, Common::Logger::MessageLevel level0, const std::string &message0, slot_type slot)
- : Common::Request<>(slot), category(category0), level(level0), message(message0) {}
+ LogRequest(Common::Logger::MessageCategory category0, Common::Logger::MessageLevel level0, time_t messageTimestamp0, const std::string &message0, slot_type slot)
+ : Common::Request<>(slot), category(category0), level(level0), messageTimestamp(messageTimestamp0), message(message0) {}
};
}