This function can be used to send a formatted log to the log file. The function creates the formatted string and then puts it onto the log queue. The log is actually sent to the log file by the asynchronous logger thread.
int log_printf(ptLogger pLOG,
char *pszFormat,
...
){