MCPcopy Create free account
hub / github.com/bwapi/bwapi / log

Function log

bwapi/TestAIModule/Source/BWAssert.cpp:9–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#define BUFFER_SIZE 1024
8
9void log(const char* format, ...)
10{
11 char buffer[BUFFER_SIZE];
12
13 va_list ap;
14 va_start(ap, format);
15 vsnprintf_s(buffer, BUFFER_SIZE, BUFFER_SIZE, format, ap);
16 va_end(ap);
17
18 FILE *outfile;
19 BWAPI::Broodwar->printf(buffer);
20 if (fopen_s(&outfile, "bwapi-data/logs/TestModule - Failed Asserts.log", "a+")==0)
21 {
22 if (outfile)
23 {
24 fprintf_s(outfile, buffer);
25 fprintf_s(outfile, "\n");
26 fclose(outfile);
27 }
28 }
29}

Callers 15

updateMethod · 0.85
updateMethod · 0.85
onStartMethod · 0.85
onStartMethod · 0.85
updateMethod · 0.85
verifyTrainingQueueMethod · 0.85
updateMethod · 0.85
startMethod · 0.85
updateMethod · 0.85
updateMethod · 0.85
updateMethod · 0.85
startMethod · 0.85

Calls 1

printfMethod · 0.80

Tested by 15

updateMethod · 0.68
updateMethod · 0.68
onStartMethod · 0.68
onStartMethod · 0.68
updateMethod · 0.68
verifyTrainingQueueMethod · 0.68
updateMethod · 0.68
startMethod · 0.68
updateMethod · 0.68
updateMethod · 0.68
updateMethod · 0.68
startMethod · 0.68