Application logging
#include <stdio.h> #include <fcntl.h> #include <time.h> #define MAX_FILE_NAME 256 int mylog(pfx, buffer,len) char *pfx; char *buffer; int len; { char filename[MAX_FILE_NAME]; time_t timebuf; struct tm *tptr; int fd; int ret; memset(filename, 0x00, sizeof(filename)); timebuf = time((time_t *) 0); tptr = localtime(&timebuf); sprintf(filename, "%s.%.2d..