> > > >

xs_log | xs | AMX X Documentation

Includes

    1. Stocks
    1. Natives
    2. Forwards
    1. Natives
    2. Stocks
    1. Natives
    2. Stocks
    1. Natives
    1. Natives
    2. Stocks
    1. Natives
    1. Natives
    2. Forwards
    3. Stocks
    1. Natives
    2. Forwards
    1. Natives
    1. Natives
    1. Natives
    2. Stocks
    1. Natives
    2. Forwards
    1. Natives
    1. Natives
    2. Forwards
    1. Natives
    2. Forwards
    1. Stocks
    1. Natives
    1. Natives
    2. Stocks
    1. Stocks
    1. Stocks
    1. Natives
    1. Natives
    2. Forwards
    3. Stocks
    1. Natives
    1. Natives
    1. Natives
    1. Natives
    2. Stocks
    1. Natives
    1. Natives
    1. Stocks
    1. Natives
    1. Natives
    1. Natives
    2. Forwards
    1. Natives
    1. Natives
    1. Natives
    1. Natives
    1. Natives
    1. Natives
    1. Natives
    2. Forwards
    1. Natives
    2. Stocks
    1. Natives
    1. Natives
    1. Natives
    2. Stocks
    1. Natives
    1. Stocks
    1. Natives
    1. Natives
    1. Natives
    1. Natives
    2. Forwards
    3. Stocks
    1. Stocks
    1. Natives
    2. Forwards
    3. Stocks
    1. Natives
    1. Natives
    2. Forwards
    3. Stocks
    1. Natives
    1. Natives
    2. Stocks
    1. Stocks

xs_log

Syntax
									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);
}
								
Variable Description
No arguments

Description
**** DEBUGGING / LOGING FUNCTIONS *****
> > > >