From: Christopher Dykes Date: Thu, 15 Jun 2017 23:54:38 +0000 (-0700) Subject: Don't try to use _CrtDbgReport in the logging framework X-Git-Tag: v2017.06.19.00~8 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=commitdiff_plain;h=cd02eca61a86f1b69023f04a11a1ec62ae4aed51 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 --- diff --git a/folly/experimental/logging/LoggerDB.cpp b/folly/experimental/logging/LoggerDB.cpp index 4886fb9a..0d643451 100644 --- a/folly/experimental/logging/LoggerDB.cpp +++ b/folly/experimental/logging/LoggerDB.cpp @@ -15,10 +15,6 @@ */ #include -#if _WIN32 -#include -#endif - #include #include #include @@ -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 } }