MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / PerformLog

Function PerformLog

log.cpp:78–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76
77
78static void PerformLog(size_t session, BNLogLevel level, const string& logger_name, size_t tid, const char* fmt, va_list args)
79{
80#if defined(_MSC_VER)
81 int len = _vscprintf(fmt, args);
82 if (len < 0)
83 return;
84 char* msg = (char*)malloc(len + 1);
85 if (!msg)
86 return;
87 if (vsnprintf(msg, len + 1, fmt, args) >= 0)
88 BNLog(session, level, logger_name.c_str(), tid, "%s", msg);
89 free(msg);
90#else
91 char* msg;
92 if (vasprintf(&msg, fmt, args) < 0)
93 return;
94 BNLog(session, level, logger_name.c_str(), tid, "%s", msg);
95 free(msg);
96#endif
97}
98
99
100void BinaryNinja::Log(BNLogLevel level, const char* fmt, ...)

Callers 8

LogMethod · 0.85
LogTraceMethod · 0.85
LogDebugMethod · 0.85
LogInfoMethod · 0.85
LogWarnMethod · 0.85
LogErrorMethod · 0.85
LogAlertMethod · 0.85
MyLogDebugFunction · 0.85

Calls 1

c_strMethod · 0.80

Tested by

no test coverage detected