DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ SaveLog()

static void Debug::SaveLog ( string log_message)
inlinestaticprivate

Only beneficial for diag and developers, removed on retail

Avoid writing to this file as it will grow indefinitely

Active when '-logToRpt=1' is set

Active when '-logToScript=1' is set

См. определение в файле Debug.c строка 520

521 {
522 if (log_message.Length() == 0)
523 return;
524
526#ifdef DIAG_DEVELOPER
527#ifndef SERVER
528 CachedObjectsParams.PARAM1_STRING.param1 = log_message;
529 GetDispatcher().CallMethod(CALL_ID_SCR_CNSL_ADD_PRINT, CachedObjectsParams.PARAM1_STRING);
530#endif
531#endif
532
534#ifdef DIAG_DEVELOPER
536#ifdef LOG_TO_FILE
537 FileHandle fileHandle = OpenFile(GetFileName(), FileMode.APPEND);
538 if (fileHandle != 0)
539 {
540 FPrintln(fileHandle, log_message);
541 CloseFile(fileHandle);
542 }
543#endif
544#endif
545
547#ifdef LOG_TO_RPT
548 PrintToRPT("" + log_message);
549#endif
550
552#ifdef LOG_TO_SCRIPT
553 Print(string.Format("%1", log_message));
554#endif
555 }
Dispatcher GetDispatcher()
Определения Dispatcher.c:20
const CallID CALL_ID_SCR_CNSL_ADD_PRINT
Определения Dispatcher.c:6
static string GetFileName()
Определения Debug.c:570
Param CallMethod(CallID call_id, Param params)
Определения Dispatcher.c:15
proto void Print(void var)
Prints content of variable to console/log.
proto void PrintToRPT(void var)
Prints content of variable to RPT file (performance warning - each write means fflush!...
FileMode
Определения EnSystem.c:383
proto void CloseFile(FileHandle file)
Close the File.
proto FileHandle OpenFile(string name, FileMode mode)
Opens File.
int[] FileHandle
Определения EnSystem.c:390
proto void FPrintln(FileHandle file, void var)
Write to file and add new line.
proto native int Length()
Returns length of string.

Перекрестные ссылки CALL_ID_SCR_CNSL_ADD_PRINT, Dispatcher::CallMethod(), CloseFile(), FPrintln(), GetDispatcher(), GetFileName(), string::Length(), OpenFile(), CachedObjectsParams::PARAM1_STRING, Print() и PrintToRPT().

Используется в LogMessage() и ReceivedLogMessageFromServer().