summaryrefslogtreecommitdiffstats
path: root/src/modules/FileLogger
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-08-18 15:58:17 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-08-18 15:58:17 +0200
commitdb5ad2e09a6b38e841463dbe7eb076492b62c948 (patch)
tree5907f6416e35cbd25432a5f1f6dc9664d36aa73c /src/modules/FileLogger
parent5da7b0847bac2a5abec95b9ac1701b74baae8964 (diff)
downloadmad-db5ad2e09a6b38e841463dbe7eb076492b62c948.tar
mad-db5ad2e09a6b38e841463dbe7eb076492b62c948.zip
Mad funktioniert jetzt unter Windows
Diffstat (limited to 'src/modules/FileLogger')
-rw-r--r--src/modules/FileLogger/CMakeLists.txt1
-rw-r--r--src/modules/FileLogger/FileLogger.h4
-rw-r--r--src/modules/FileLogger/Module.cpp6
3 files changed, 7 insertions, 4 deletions
diff --git a/src/modules/FileLogger/CMakeLists.txt b/src/modules/FileLogger/CMakeLists.txt
index 2f654e8..ac1deab 100644
--- a/src/modules/FileLogger/CMakeLists.txt
+++ b/src/modules/FileLogger/CMakeLists.txt
@@ -4,3 +4,4 @@ mad_module(FileLogger
FileLogger.h
Module.cpp Module.h
)
+mad_module_libraries(FileLogger Common)
diff --git a/src/modules/FileLogger/FileLogger.h b/src/modules/FileLogger/FileLogger.h
index a32003d..0ee9ad7 100644
--- a/src/modules/FileLogger/FileLogger.h
+++ b/src/modules/FileLogger/FileLogger.h
@@ -34,10 +34,10 @@ class FileLogger : public Core::Logger, public Core::RemoteLogger {
std::ofstream file;
protected:
- virtual void logMessage(MessageCategory, MessageLevel, time_t, const std::string &message) {
+ virtual void logMessage(MessageCategory /*category*/, MessageLevel /*level*/, boost::posix_time::ptime /*timestamp*/, const std::string &message) {
file << message << std::endl;
}
- virtual void logMessage(MessageCategory, MessageLevel, time_t, const std::string &message, const std::string &messageSource) {
+ virtual void logMessage(MessageCategory /*category*/, MessageLevel /*level*/, boost::posix_time::ptime /*timestamp*/, const std::string &message, const std::string &messageSource) {
file << message << " from "<< messageSource << std::endl;
}
diff --git a/src/modules/FileLogger/Module.cpp b/src/modules/FileLogger/Module.cpp
index b8a6954..e715386 100644
--- a/src/modules/FileLogger/Module.cpp
+++ b/src/modules/FileLogger/Module.cpp
@@ -17,6 +17,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "../export.h"
+
#include "Module.h"
#include <Core/ConfigEntry.h>
@@ -38,7 +40,7 @@ bool Module::handleConfigEntry(const Core::ConfigEntry &entry, bool handled) {
application->getLogManager()->registerLogger(boost::static_pointer_cast<Core::Logger>(logger));
}
else {
- application->logf(Core::LoggerBase::WARNING, "FileLogger: no filename given.");
+ application->logf(Core::LoggerBase::LOG_WARNING, "FileLogger: no filename given.");
}
return true;
@@ -55,7 +57,7 @@ bool Module::handleConfigEntry(const Core::ConfigEntry &entry, bool handled) {
extern "C" {
-Mad::Common::Module* FileLogger_create(Mad::Common::Application *application) {
+MAD_MODULE_EXPORT Mad::Common::Module* FileLogger_create(Mad::Common::Application *application) {
return new Mad::Modules::FileLogger::Module(application);
}