1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
//
// DebugOutput - shows how to use DebugOutputAppender to write to the windows debug output.
//
#include <plog/Log.h>
#include <plog/Init.h>
#include <plog/Formatters/TxtFormatter.h>
#include <plog/Appenders/DebugOutputAppender.h>
int main()
{
static plog::DebugOutputAppender<plog::TxtFormatter> debugOutputAppender;
plog::init(plog::verbose, &debugOutputAppender);
PLOGD << "Hello log!"; // short macro
PLOG_DEBUG << "Hello log!"; // long macro
PLOG(plog::debug) << "Hello log!"; // function-style macro
return 0;
}
|