At 18:58 08.09.2005, you wrote:
... i tried removing the second fprintf, and now my logit.c looks like this: ..... date_time = ctime ( (time_t *) &tval.tv_sec ); pDate = date_time + 4; /* skip day of week name */ iDateLen = strlen ( pDate ); /* length including year */ pYear = pDate + ( iDateLen - 5 ); /* point to start of year */ date_time [ iDateLen - 2 ] = '\0'; /* cut off the year */lMsec = (tval.tv_usec + 500) / 1000; /* convert useconds to milliseconds */fprintf ( str, "%s.%03ld %.4s [%ld] %s\n", pDate, lMsec, pYear, (long) getpid(), msgbuf ); fflush ( str ); } else { syslog ( loglev, "%s", msgbuf) ; }if ( iChunk == -1 ) { /* * We blew out the format buffer. */ if ( str ) {fprintf ( str, "%s [%ld] Buffer size exceeded logging msg: %s\n",date_time, (long) getpid(), format ); fflush ( str ); } else { ..... but it doesnt solve the blank lines.... ;(You're sure it recompiled and you placed the new executable in place of the old one?
yep! i changed the version number to 4.0.9!! believe me - the blank lines are still there?!? i have no idea why this is happening.... maybe the logit.c code isnt used at all!?
The fact is you're getting more than just blank lines, you're getting lines with timestamp and other info. That info is coming from the second fprintf, thus my question about whether the executable got built right and is really in use now.
im absolutely sure, that the new compiled version is in use: Sep 9 08:47:29.136 2005 [27225] (v4.0.9) Servicing request from "---" at --- Sep 9 08:47:29.136 2005 Sep 9 08:47:29.552 2005 [27225] Stats: xxx 0 0 0 0 --- --- Sep 9 08:47:29.552 2005 Sep 9 08:48:12.535 2005 [27229] (v4.0.9) Servicing request from "---" at --- Sep 9 08:48:12.535 2005 Sep 9 08:48:12.622 2005 [27229] Stats: xxx 0 0 0 0 --- --- Sep 9 08:48:12.622 2005 VERY strange....
