summaryrefslogtreecommitdiffstats
path: root/src/Daemon/Requests
diff options
context:
space:
mode:
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) {}
};
}