summaryrefslogtreecommitdiff
path: root/src/liblogger/WinDbgLogSink.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/liblogger/WinDbgLogSink.cpp')
-rwxr-xr-xsrc/liblogger/WinDbgLogSink.cpp22
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( ) );
+}