xs_log
- Синтаксис
-
enum xs_logtypes { xs_debug, xs_message, xs_warning, xs_error, xs_fatalerror, xs__assertionfailed, // must come last xs_logtypes_count } stock const xs__logtypenames[xs_logtypes_count][] = {"DEBUG", "", "WARNING", "ERROR", "FATAL ERROR", "DEBUG ASSERTION FAILED"}; // tested stock xs_log(xs_logtypes:logtype, any:...) { // WARNING: Don't try to use assert in here; it uses this func // Don't log debug if not in debug mode #if !XS_DEBUG if (logtype == xs_debug) return; #endif new buffer[XS_LOGBUFFER_SIZE+1]; buffer[XS_LOGBUFFER_SIZE]=0; format_args(buffer, XS_LOGBUFFER_SIZE, 1 /* go from SECOND argument*/); new bool:addLogTypeName = strlen(xs__logtypenames[logtype]) ? true : false; // Use AMXX's logging system log_amx("%s%s%s", addLogTypeName ? xs__logtypenames[logtype] : "", addLogTypeName ? ": " : "", buffer); }
Переменная | Описание |
---|---|
Нет агрументов |
- Описание
- **** DEBUGGING / LOGING FUNCTIONS *****