Commit cd02eca6 authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot

Don't try to use _CrtDbgReport in the logging framework

Summary: Glog doesn't try to, so there's no real reason to try and be smart. Just do the same thing as every other platform for now until we have reason to do otherwise.

Reviewed By: simpkins

Differential Revision: D5259435

fbshipit-source-id: dcdf55f51f2e13945afd351cb45e9c1a22f56218
parent 19859f96
......@@ -15,10 +15,6 @@
*/
#include <folly/experimental/logging/LoggerDB.h>
#if _WIN32
#include <crtdbg.h>
#endif
#include <folly/Conv.h>
#include <folly/FileUtil.h>
#include <folly/String.h>
......@@ -275,11 +271,6 @@ void LoggerDB::defaultInternalWarningImpl(
return;
}
#if _WIN32
// Use _CrtDbgReport() to report the error
_CrtDbgReport(
_CRT_WARN, filename, lineNumber, "folly::logging", "%s", msg.c_str());
#else
if (folly::kIsDebug) {
// Write directly to file descriptor 2.
//
......@@ -299,6 +290,5 @@ void LoggerDB::defaultInternalWarningImpl(
"logging warning:", filename, ":", lineNumber, ": ", msg, "\n");
folly::writeFull(STDERR_FILENO, fullMsg.data(), fullMsg.size());
}
#endif
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment