void i_kslog_c(const char* const level, const char* const file, const int line, const char* const function, const char* const fmt, ...) { writeFmtToStdout("%s: %s (%u): %s: ", level, lastPathEntry(file), line, function); va_list args; va_start(args,fmt); writeFmtArgsToStdout(fmt, args); va_end(args); kslog_i_writeToStdout("\n"); flushStdout(); }
void i_kslog_c(const char* level, const char* file, unsigned int line, const char* function, const char* fmt, ...) { if(*fmt != 0) { char buffer[KSLogger_CBufferSize]; snprintf(buffer, sizeof(buffer), "%s: %s (%u): %s: ", level, lastPathEntry(file), line, function); writeToStdout(buffer); va_list args; va_start(args,fmt); vsnprintf(buffer, sizeof(buffer), fmt, args); va_end(args); writeToStdout(buffer); write(STDOUT_FILENO, "\n", 1); } }