MCPcopy Create free account
hub / github.com/Meridian59/Meridian59 / LogError

Function LogError

roomedit/source/windeu.cpp:880–911  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

878
879
880void LogError(const char *logstr, ...)
881{
882 va_list args;
883 time_t tval;
884 char *tstr;
885
886 errorFound = TRUE;
887 // Open logfile if closed
888 if (Debug == TRUE && logfile == NULL)
889 {
890 logfile = fopen(DEU_LOG_FILE, "a");
891 if (logfile == NULL)
892 {
893 Notify ("Could not open log file \"%s\"", DEU_LOG_FILE);
894 }
895 }
896 if (Debug == TRUE && logfile != NULL)
897 {
898 va_start( args, logstr);
899 /* if the messsage begins with ":", output the current date & time first */
900 if (logstr[ 0] == ':')
901 {
902 time( &tval);
903 tstr = ctime( &tval);
904 tstr[ strlen( tstr) - 1] = '\0';
905 fprintf(logfile, "%s", tstr);
906 }
907 vfprintf( logfile, logstr, args);
908 va_end( args);
909 fflush (logfile);
910 }
911}
912
913/*
914 write a message in the status bar of the main frame

Callers 9

BSPDumpTreeFunction · 0.85
BSPFreeNodeFunction · 0.85
BSPSplitWallsFunction · 0.85
BSPFindPolyBoxFunction · 0.85
BSPFindBoundingBoxesFunction · 0.85
BSPSplitPolyFunction · 0.85
BSPBuildNodeFunction · 0.85
AddWallsFromLinedefFunction · 0.85
BSPFindLeafByPointFunction · 0.85

Calls 3

NotifyFunction · 0.85
fprintfFunction · 0.85
vfprintfFunction · 0.85

Tested by

no test coverage detected