diff options
Diffstat (limited to 'src/liblogger/WinDbgLogSink.cpp')
-rwxr-xr-x | src/liblogger/WinDbgLogSink.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/liblogger/WinDbgLogSink.cpp b/src/liblogger/WinDbgLogSink.cpp new file mode 100755 index 0000000..f5a830c --- /dev/null +++ b/src/liblogger/WinDbgLogSink.cpp @@ -0,0 +1,22 @@ +#include "WinDbgLogSink.hpp" + +#include <sstream> + +#define WIN32_MEAN_AND_LEAN +#include <windows.h> + +using namespace std; + +void WinDbgLogSink::log( const LogLevel level, const string &msg ) +{ + if( level > reportingLevel( ) ) return; + + ostringstream ss; + + ss << Logger::toString( level ) + << ": " + << msg + << "\r\n"; + + OutputDebugString( ss.str( ).c_str( ) ); +} |