int InfoLog(const char *fmt, ...)
{
char log[1024] = {0};
unsigned int loglen = 0;
va_list argptr;
int ret = 0;
if( logfp == NULL)
{
return -1;
}
pthread_mutex_lock(&log_lock);
va_start(argptr, fmt);
ret = vsprintf(log, fmt, argptr);
//syslog(LOG_INFO, "%s\n", fmt);
va_end(argptr);
loglen = strlen(log);
ret = Writelog(INFO_LOG, log, loglen);
pthread_mutex_unlock(&log_lock);
return ret;
}
阅读(913) | 评论(0) | 转发(0) |