MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / _log_writef

Function _log_writef

StereoKitC/log.cpp:178–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176///////////////////////////////////////////
177
178void _log_writef(log_ level, const char* text, va_list args) {
179 va_list copy;
180 va_copy(copy, args);
181 size_t length = vsnprintf(nullptr, 0, text, args);
182 char* buffer = sk_malloc_t(char, length + 2);
183 vsnprintf(buffer, length + 2, text, copy);
184
185 log_write(level, buffer);
186 sk_free(buffer);
187 va_end(copy);
188}
189
190///////////////////////////////////////////
191

Callers 5

log_writefFunction · 0.85
log_diagfFunction · 0.85
log_infofFunction · 0.85
log_warnfFunction · 0.85
log_errfFunction · 0.85

Calls 1

log_writeFunction · 0.85

Tested by

no test coverage detected