MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / sayf

Function sayf

benchmarks/benchmarks.cpp:1665–1687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1663bool logErrorReported = false;
1664
1665void sayf(int indent, const char* fmt, ...)
1666{
1667 static char indentBuffer[] = " ";
1668 static char buf[2048];
1669
1670 indentBuffer[indent] = '\0';
1671
1672 va_list arglist;
1673 va_start(arglist, fmt);
1674 vsprintf(buf, fmt, arglist);
1675 va_end(arglist);
1676
1677 if (*logOut) {
1678 (*logOut) << indentBuffer << buf;
1679 }
1680 else if (!logErrorReported) {
1681 std::printf("Note: Error writing to log file. Future output will appear only on stdout\n");
1682 logErrorReported = true;
1683 }
1684 std::printf("%s%s", indentBuffer, buf);
1685
1686 indentBuffer[indent] = ' ';
1687}
1688
1689
1690// Returns a formatted timestamp.

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected