amputate unused log_message_write

This commit is contained in:
Aliaksey Kandratsenka 2024-02-05 22:40:27 -05:00
parent b6798a5130
commit e544d402f7
2 changed files with 2 additions and 8 deletions

View File

@ -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();
}

View File

@ -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