diff options
Diffstat (limited to 'src/modules/FileLogger')
-rw-r--r-- | src/modules/FileLogger/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/modules/FileLogger/FileLogger.h | 4 | ||||
-rw-r--r-- | src/modules/FileLogger/Module.cpp | 6 |
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); } |