From db5ad2e09a6b38e841463dbe7eb076492b62c948 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 18 Aug 2009 15:58:17 +0200 Subject: Mad funktioniert jetzt unter Windows --- src/modules/FileLogger/CMakeLists.txt | 1 + src/modules/FileLogger/FileLogger.h | 4 ++-- src/modules/FileLogger/Module.cpp | 6 ++++-- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src/modules/FileLogger') 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 . */ +#include "../export.h" + #include "Module.h" #include @@ -38,7 +40,7 @@ bool Module::handleConfigEntry(const Core::ConfigEntry &entry, bool handled) { application->getLogManager()->registerLogger(boost::static_pointer_cast(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); } -- cgit v1.2.3