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