diff --git a/src/internal_logging.cc b/src/internal_logging.cc index f3368a9..618f7a1 100644 --- a/src/internal_logging.cc +++ b/src/internal_logging.cc @@ -51,9 +51,6 @@ static void WriteMessage(const char* msg, int length) { WRITE_TO_STDERR(msg, length); } -void (*log_message_writer)(const char* msg, int length) = WriteMessage; - - class Logger { public: bool Add(const LogItem& item); @@ -89,11 +86,11 @@ void Log(LogMode mode, const char* filename, int line, int msglen = state.p_ - state.buf_; if (mode == kLog) { - (*log_message_writer)(state.buf_, msglen); + WriteMessage(state.buf_, msglen); return; } - (*log_message_writer)(state.buf_, msglen); + WriteMessage(state.buf_, msglen); abort(); } diff --git a/src/internal_logging.h b/src/internal_logging.h index 661c9e5..f9daa6c 100644 --- a/src/internal_logging.h +++ b/src/internal_logging.h @@ -93,9 +93,6 @@ extern PERFTOOLS_DLL_DECL void Log(LogMode mode, const char* filename, int line, LogItem a, LogItem b = LogItem(), LogItem c = LogItem(), LogItem d = LogItem()); -// Tests can override this function to collect logging messages. -extern PERFTOOLS_DLL_DECL void (*log_message_writer)(const char* msg, int length); - } // end tcmalloc namespace // Like assert(), but executed even in NDEBUG mode