summaryrefslogtreecommitdiff
path: root/include/logger/Logger.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/logger/Logger.hpp')
-rwxr-xr-xinclude/logger/Logger.hpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/include/logger/Logger.hpp b/include/logger/Logger.hpp
index dc514ae..9a84f55 100755
--- a/include/logger/Logger.hpp
+++ b/include/logger/Logger.hpp
@@ -1,6 +1,7 @@
#ifndef __LOGGER_H
#define __LOGGER_H
+#include "Exportable.hpp"
#include "Singleton.hpp"
#include "ScopedPtr.hpp"
@@ -29,21 +30,21 @@ class Logger : public Singleton< Logger >
public:
DECLARE_SINGLETON( Logger )
- void addSink( LogSink *sink );
- void removeSink( LogSink *sink );
- void log( const LogLevel level, const std::string &msg );
+ DLL_EXPORT void addSink( LogSink *sink );
+ DLL_EXPORT void removeSink( LogSink *sink );
+ DLL_EXPORT void log( const LogLevel level, const std::string &msg );
- static std::string toString( const LogLevel level );
- static LogLevel fromString( const std::string &s );
+ DLL_EXPORT static std::string toString( const LogLevel level );
+ DLL_EXPORT static LogLevel fromString( const std::string &s );
- void openConsoleLog( const LogLevel level );
- void openFileLog( const LogLevel level, const std::string &filename );
- void openSyslog( const LogLevel level, const std::string &ident, const std::string &facility );
- void openWinDbgLog( const LogLevel level );
+ DLL_EXPORT void openConsoleLog( const LogLevel level );
+ DLL_EXPORT void openFileLog( const LogLevel level, const std::string &filename );
+ DLL_EXPORT void openSyslog( const LogLevel level, const std::string &ident, const std::string &facility );
+ DLL_EXPORT void openWinDbgLog( const LogLevel level );
protected:
- Logger( );
- virtual ~Logger( );
+ DLL_EXPORT Logger( );
+ DLL_EXPORT virtual ~Logger( );
private:
scopedPtr< LoggerImpl > m_impl;
@@ -54,9 +55,9 @@ DEFINE_SINGLETON( Logger )
class LogStream : private noncopyable, public std::ostringstream
{
public:
- LogStream( Logger &logger, const LogLevel level );
- ~LogStream( );
- std::ostream &get( );
+ DLL_EXPORT LogStream( Logger &logger, const LogLevel level );
+ DLL_EXPORT ~LogStream( );
+ DLL_EXPORT std::ostream &get( );
private:
LogStream( );