search for: logmode_stderr

Displaying 1 result from an estimated 1 matches for "logmode_stderr".

2010 Sep 20
0
No subject
...ogger.c @@ -69,14 +69,23 @@ =20 va_start(ap, format); =20 + time_t t =3D time(NULL); + char time[32]; + char* time1 =3D asctime(localtime(&t)); + strncpy(time, time1, 26); + char* newline =3D strchr(time, '\n'); + if(newline) + *newline =3D '\0'; + switch(logmode) { case LOGMODE_STDERR: + fprintf(stderr, "%s%s ", time, ":"); vfprintf(stderr, format, ap); fprintf(stderr, "\n"); fflush(stderr); break; case LOGMODE_FILE: - fprintf(logfile, "%ld %s[%ld]: ", time(NULL), logident, = (long)logpid); + fprintf(logfile, &quot...