src/con-logger.cpp
// Log a text line to the selected console or file (or both, or no one).
// If there is no selected console or file, return error only if
// noUnselError is false (meaning it has to be seen as an error).

Log a text line to the selected console or file (or both, or no one).
If there is no selected console or file, return error only if
noUnselError is false (meaning it has to be seen as an error).
Log a text line to the selected console or file ( or both or no one ) . If there is no selected console or file return error only if noUnselError is false ( meaning it has to be seen as an error ) .
bool conLoggerClass::logLine(
	char* text,
	bool file,
	bool console,
	bool noUnselError,
	...
) {
	va_list paramList;
	va_start(paramList, noUnselError);
	vprintf(text, paramList);
	printf("\n");
	va_end(paramList);
	return true;
}
bool conLoggerClass :: logLine ( char * text , bool file , bool console , bool noUnselError , ... ) { va_list paramList ; va_start ( paramList , noUnselError ) ; vprintf ( text , paramList ) ; printf ( " \n " ) ; va_end ( paramList ) ; return true ; }
Log a text line to the selected console or file (or both, or no one).
Log a text line to the selected console or file ( or both or no one ) .
// text to log
 // log to file?
 // log to console?
 // return an error if those are unselected?
 // that's for the printf like params
 // NEW 2010
 /*	bool failed=false;
	va_list paramList;

	if (!initialized) return false;

	// get the first param of the list
	va_start(paramList, noUnselError);

	// let's compose the string
	// We decrement strBufferSize in one, because
	// we want _vsnprintf to keep a byte for the 0.
	// I guess it happens because, for vsnprintf, the last zero is
	// wrote only if it's able to, without taking it as an error if it's
	// not able to do it.
	if (_vsnprintf(
		strBuffer,// storage for the final string
		strBufferSize-1,// size of the buffer (keeping a space for the 0)
		text,// format string
		paramList// list of parameters
		)<0) return false;// it means error

	// add the zero if necessary
	strBuffer[strBufferSize-1]=0;

	// we won't use the param list anymore
	va_end(paramList);

	// log to console first
	if (console) {
		if (!logToConsole(strBuffer, noUnselError)) failed=true;
	}

	// log to file
	if (file) {
		if (!logToFile(strBuffer, noUnselError)) failed=true;
	}

	// did it fail?
	if (failed) return false;
*/ // all ok
