summaryrefslogtreecommitdiff
path: root/src/logger/WinDbgLogSink.cpp
blob: f5a830c4562fc6af30c213cc7da6e264fbb5007d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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( ) );
}