MCPcopy Create free account
hub / github.com/Phobos-developers/Phobos / WriteSyncLog

Method WriteSyncLog

src/Misc/SyncLogging.cpp:119–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void SyncLogger::WriteSyncLog(const char* logFilename)
120{
121 auto const pLogFile = fopen(logFilename, "at");
122
123 if (pLogFile)
124 {
125 Debug::Log("Writing to sync log file '%s'.\n", logFilename);
126
127 fprintf(pLogFile, "\nPhobos synchronization log:\n\n");
128
129 int frameDigits = GeneralUtils::CountDigitsInNumber(Unsorted::CurrentFrame);
130
131 WriteRNGCalls(pLogFile, frameDigits);
132 WriteFacingChanges(pLogFile, frameDigits);
133 WriteTargetChanges(pLogFile, frameDigits);
134 WriteDestinationChanges(pLogFile, frameDigits);
135 WriteAnimCreations(pLogFile, frameDigits);
136 WriteTeams(pLogFile);
137
138 fclose(pLogFile);
139 }
140 else
141 {
142 Debug::Log("Failed to open sync log file '%s'.\n", logFilename);
143 }
144}
145
146void SyncLogger::WriteRNGCalls(FILE* const pLogFile, int frameDigits)
147{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected