Hi,
I have a message log and its function to log a message is this...
void log(LogMessageType messageType,
string message,
const string fileName,
const int lineNumber,
const string functionName);
so I wrote a handy macro that i could call to log the message...
#define logMessage(type,message)(MessageLog::getInstance()->log(type, message, __FILE__, __LINE__, __FUNCTION__))
So today I added support so the log could take extra parameters such as in in so the message could be like this "Loaded %i files" and it works fine, but im wondering how i can pass the variable args via the macro?
Thanks for any help.
heres the new calls if they help with the problem...
void log(LogMessageType messageType,
string message,
const string fileName,
const int lineNumber,
const string functionName, ...);
#define logMessage(type,message,...)(MessageLog::getInstance()->log(type, message, __FILE__, __LINE__, __FUNCTION__))