summaryrefslogtreecommitdiffstats
path: root/src/Daemon/Requests
diff options
context:
space:
mode:
Diffstat (limited to 'src/Daemon/Requests')
-rw-r--r--src/Daemon/Requests/CMakeLists.txt5
-rw-r--r--src/Daemon/Requests/LogRequest.cpp4
-rw-r--r--src/Daemon/Requests/LogRequest.h10
3 files changed, 9 insertions, 10 deletions
diff --git a/src/Daemon/Requests/CMakeLists.txt b/src/Daemon/Requests/CMakeLists.txt
deleted file mode 100644
index 90eb542..0000000
--- a/src/Daemon/Requests/CMakeLists.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-include_directories(${INCLUDES})
-
-add_library(DaemonRequests STATIC
- LogRequest.cpp LogRequest.h
-)
diff --git a/src/Daemon/Requests/LogRequest.cpp b/src/Daemon/Requests/LogRequest.cpp
index f1469ca..2d12fc8 100644
--- a/src/Daemon/Requests/LogRequest.cpp
+++ b/src/Daemon/Requests/LogRequest.cpp
@@ -19,6 +19,8 @@
#include "LogRequest.h"
+#include <boost/date_time/posix_time/posix_time.hpp>
+
namespace Mad {
namespace Daemon {
namespace Requests {
@@ -30,7 +32,7 @@ void LogRequest::sendRequest() {
packet.set("category", category);
packet.set("level", level);
- packet.set("timestamp", messageTimestamp);
+ packet.set("timestamp", boost::posix_time::to_iso_string(messageTimestamp));
packet.set("message", message);
sendPacket(packet);
diff --git a/src/Daemon/Requests/LogRequest.h b/src/Daemon/Requests/LogRequest.h
index ecc36fb..49d5c6f 100644
--- a/src/Daemon/Requests/LogRequest.h
+++ b/src/Daemon/Requests/LogRequest.h
@@ -20,25 +20,27 @@
#ifndef MAD_DAEMON_REQUESTS_LOGREQUEST_H_
#define MAD_DAEMON_REQUESTS_LOGREQUEST_H_
+#include "../export.h"
+
#include <Common/Request.h>
-#include <ctime>
+#include <boost/date_time/posix_time/ptime.hpp>
namespace Mad {
namespace Daemon {
namespace Requests {
-class LogRequest : public Common::Request {
+class MAD_DAEMON_EXPORT LogRequest : public Common::Request {
private:
Core::LoggerBase::MessageCategory category;
Core::LoggerBase::MessageLevel level;
- time_t messageTimestamp;
+ boost::posix_time::ptime messageTimestamp;
std::string message;
protected:
virtual void sendRequest();
public:
- LogRequest(Common::Application *application, Core::LoggerBase::MessageCategory category0, Core::LoggerBase::MessageLevel level0, time_t messageTimestamp0, const std::string &message0)
+ LogRequest(Common::Application *application, Core::LoggerBase::MessageCategory category0, Core::LoggerBase::MessageLevel level0, boost::posix_time::ptime messageTimestamp0, const std::string &message0)
: Common::Request(application), category(category0), level(level0), messageTimestamp(messageTimestamp0), message(message0) {}
};