Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: CVS

cvs commit: apache/support rotatelogs.c

 

 

Apache cvs RSS feed   Index | Next | Previous | View Threaded


fielding at hyperreal

Apr 15, 1997, 11:18 PM

Post #1 of 1 (24 views)
Permalink
cvs commit: apache/support rotatelogs.c

fielding 97/04/15 23:18:26

Modified: support rotatelogs.c
Log:
Use a zero-padded decimal number for logfile names to improve
alphabetic sorts on the directory.

Submitted by: Mitchell Blank Jr
Reviewed by: Ben Laurie, Jim Jagielski, Roy Fielding

Revision Changes Path
1.6 +1 -1 apache/support/rotatelogs.c

Index: rotatelogs.c
===================================================================
RCS file: /export/home/cvs/apache/support/rotatelogs.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C3 -r1.5 -r1.6
*** rotatelogs.c 1996/11/03 21:13:00 1.5
--- rotatelogs.c 1997/04/16 06:18:25 1.6
***************
*** 66,72 ****
if(nLogFD < 0)
{
time_t tLogStart=(time(NULL)/tRotation)*tRotation;
! sprintf(buf2,"%s.%d",szLogRoot,(int)tLogStart);
tLogEnd=tLogStart+tRotation;
nLogFD=open(buf2,O_WRONLY|O_CREAT|O_APPEND,0666);
if(nLogFD < 0)
--- 66,72 ----
if(nLogFD < 0)
{
time_t tLogStart=(time(NULL)/tRotation)*tRotation;
! sprintf(buf2,"%s.%010d",szLogRoot,(int)tLogStart);
tLogEnd=tLogStart+tRotation;
nLogFD=open(buf2,O_WRONLY|O_CREAT|O_APPEND,0666);
if(nLogFD < 0)

Apache cvs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.