You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
545 B

#include "epm_handler_common.h"
#define MAX_PATH_LENGTH 200
#define MAX_PRINTLINE_LENGTH 400000
void WriteLog(logical debug, const char* format, ...)
{
va_list arg;
char tmp[MAX_PRINTLINE_LENGTH];
char date_string[MAX_PATH_LENGTH];
time_t now;
struct tm *p;
//get the message
memset(tmp, 0, sizeof(tmp));
va_start(arg, format);
vsprintf(tmp, format, arg);
va_end(arg);
//----------print to command window for trace--------//
//printf("%s\n", tmp);
printf("%s\n", tmp);
//print message to log file
TC_write_syslog("%s\n", tmp);
}