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

Mailing List Archive: Apache: Users

rotatelogs on Windows

 

 

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


jtu at esidesign

Oct 5, 2005, 9:30 AM

Post #1 of 6 (13136 views)
Permalink
rotatelogs on Windows

I'm trying to edit my httpd.conf to use rotatelogs for Apache running
on Windows.

I'm doing this and it doesn't like it.
CustomLog "| bin/rotatelogs logs/access.log 3600" common

I've also tried using the full paths and it doesn't like the space in
"Program Files"
CustomLog "| c:/Program Files/Apache Group/apache/bin/rotatelogs
c:/Program Files/Apache Group/apache/logs/access.log 3600" common

Does rotatelogs work differently on Windows? Do I need to escape
those space characters?

-James

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


wrowe at rowe-clan

Oct 5, 2005, 9:37 AM

Post #2 of 6 (13064 views)
Permalink
Re: rotatelogs on Windows [In reply to]

James Tu wrote:
> I'm trying to edit my httpd.conf to use rotatelogs for Apache running on
> Windows.
>
> I'm doing this and it doesn't like it.
> CustomLog "| bin/rotatelogs logs/access.log 3600" common

Did you mean bin/rotatelogs.exe ?

If that doesn't lick it, what about using 'bin\rotatelogs.exe'?

This might be a very odd case where a shell command's shell doesn't like
forward slashes (cmd.exe is picky). I've actually worked out how to
nest double quotes at one point, so that the command was quoted (useful
for paths-in-spaces and forward slashes.)

cmd.exe likes "c:/winnt/notepad.exe" or c:\winnt\notepad.exe and doesn't
like c:/winnt/notepad.exe.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


aaron.wagner at bankofamerica

Oct 5, 2005, 9:48 AM

Post #3 of 6 (13071 views)
Permalink
RE: rotatelogs on Windows [In reply to]

This is a line from my production server httpd.conf. It rotates daily.

CustomLog "|D:/WebCore2/Apache2/bin/rotatelogs.exe
D:/WebCore2/Apache2/logs/history/commonLog.%Y-%m-%d-%H_%M_%S.log 86400
-300" combined


Thanx
Aaron N Wagner
Monitoring Systems and Network Tools
CCO-Command Center Operations
804.515.6298


> -----Original Message-----
> From: William A. Rowe, Jr. [mailto:wrowe [at] rowe-clan]
> Sent: Wednesday, October 05, 2005 12:38 PM
> To: users [at] httpd
> Subject: Re: [users [at] http] rotatelogs on Windows
>
> James Tu wrote:
> > I'm trying to edit my httpd.conf to use rotatelogs for
> Apache running on
> > Windows.
> >
> > I'm doing this and it doesn't like it.
> > CustomLog "| bin/rotatelogs logs/access.log 3600" common
>
> Did you mean bin/rotatelogs.exe ?
>
> If that doesn't lick it, what about using 'bin\rotatelogs.exe'?
>
> This might be a very odd case where a shell command's shell
> doesn't like
> forward slashes (cmd.exe is picky). I've actually worked out how to
> nest double quotes at one point, so that the command was
> quoted (useful
> for paths-in-spaces and forward slashes.)
>
> cmd.exe likes "c:/winnt/notepad.exe" or c:\winnt\notepad.exe
> and doesn't
> like c:/winnt/notepad.exe.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe [at] httpd
> " from the digest: users-digest-unsubscribe [at] httpd
> For additional commands, e-mail: users-help [at] httpd
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


jtu at esidesign

Oct 5, 2005, 12:48 PM

Post #4 of 6 (13050 views)
Permalink
RE: rotatelogs on Windows [In reply to]

Thanks Aaron:

After some experimenting...the following worked for me. I think most
people will encounter this issue...
What I had to do was to use truncated directory names!

Here's the line from my server...
#daily rotation
CustomLog "| D:\Progra~1\Apache~1\Apache\bin\rotatelogs.exe
logs\access%Y_%m_%d_%H_%M_%S.log 86400 -300" common


One more thing...when I did this, the hour, minute and seconds
always show as 00_00_00, as in access_2005_10_04_00_00_00.log. Is
that what you guys are seeing too? I guess the time doesn't start
when you start the server, it treats it as if it's the beginning of
the day?

-James


>This is a line from my production server httpd.conf. It rotates daily.
>
>CustomLog "|D:/WebCore2/Apache2/bin/rotatelogs.exe
>D:/WebCore2/Apache2/logs/history/commonLog.%Y-%m-%d-%H_%M_%S.log 86400
>-300" combined
>
>
>Thanx
>Aaron N Wagner
>Monitoring Systems and Network Tools
>CCO-Command Center Operations
>804.515.6298
>
>
>> -----Original Message-----
>> From: William A. Rowe, Jr. [mailto:wrowe [at] rowe-clan]
>> Sent: Wednesday, October 05, 2005 12:38 PM
>> To: users [at] httpd
>> Subject: Re: [users [at] http] rotatelogs on Windows
>>
>> James Tu wrote:
>> > I'm trying to edit my httpd.conf to use rotatelogs for
>> Apache running on
>> > Windows.
>> >
>> > I'm doing this and it doesn't like it.
>> > CustomLog "| bin/rotatelogs logs/access.log 3600" common
>>
>> Did you mean bin/rotatelogs.exe ?
>>
>> If that doesn't lick it, what about using 'bin\rotatelogs.exe'?
>>
>> This might be a very odd case where a shell command's shell
>> doesn't like
>> forward slashes (cmd.exe is picky). I've actually worked out how to
>> nest double quotes at one point, so that the command was
>> quoted (useful
>> for paths-in-spaces and forward slashes.)
>>
>> cmd.exe likes "c:/winnt/notepad.exe" or c:\winnt\notepad.exe
>> and doesn't
>> like c:/winnt/notepad.exe.
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP
>> Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe [at] httpd
>> " from the digest: users-digest-unsubscribe [at] httpd
>> For additional commands, e-mail: users-help [at] httpd
>>
>>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe [at] httpd
> " from the digest: users-digest-unsubscribe [at] httpd
>For additional commands, e-mail: users-help [at] httpd


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


aaron.wagner at bankofamerica

Oct 5, 2005, 12:57 PM

Post #5 of 6 (13055 views)
Permalink
RE: rotatelogs on Windows [In reply to]

> One more thing...when I did this, the hour, minute and seconds
> always show as 00_00_00, as in access_2005_10_04_00_00_00.log. Is
> that what you guys are seeing too? I guess the time doesn't start
> when you start the server, it treats it as if it's the beginning of
> the day?

I didn't notice it till now. Not sure why it does that, my logs rotate
during early afternoon.

Thanx
Aaron N Wagner
Monitoring Systems and Network Tools
CCO-Command Center Operations
804.515.6298


> -----Original Message-----
> From: James Tu [mailto:jtu [at] esidesign]
> Sent: Wednesday, October 05, 2005 3:49 PM
> To: users [at] httpd
> Subject: RE: [users [at] http] rotatelogs on Windows
>
> Thanks Aaron:
>
> After some experimenting...the following worked for me. I think most
> people will encounter this issue...
> What I had to do was to use truncated directory names!
>
> Here's the line from my server...
> #daily rotation
> CustomLog "| D:\Progra~1\Apache~1\Apache\bin\rotatelogs.exe
> logs\access%Y_%m_%d_%H_%M_%S.log 86400 -300" common
>
>
> One more thing...when I did this, the hour, minute and seconds
> always show as 00_00_00, as in access_2005_10_04_00_00_00.log. Is
> that what you guys are seeing too? I guess the time doesn't start
> when you start the server, it treats it as if it's the beginning of
> the day?
>
> -James
>
>
> >This is a line from my production server httpd.conf. It
> rotates daily.
> >
> >CustomLog "|D:/WebCore2/Apache2/bin/rotatelogs.exe
> >D:/WebCore2/Apache2/logs/history/commonLog.%Y-%m-%d-%H_%M_%S.
> log 86400
> >-300" combined
> >
> >
> >Thanx
> >Aaron N Wagner
> >Monitoring Systems and Network Tools
> >CCO-Command Center Operations
> >804.515.6298
> >
> >
> >> -----Original Message-----
> >> From: William A. Rowe, Jr. [mailto:wrowe [at] rowe-clan]
> >> Sent: Wednesday, October 05, 2005 12:38 PM
> >> To: users [at] httpd
> >> Subject: Re: [users [at] http] rotatelogs on Windows
> >>
> >> James Tu wrote:
> >> > I'm trying to edit my httpd.conf to use rotatelogs for
> >> Apache running on
> >> > Windows.
> >> >
> >> > I'm doing this and it doesn't like it.
> >> > CustomLog "| bin/rotatelogs logs/access.log 3600" common
> >>
> >> Did you mean bin/rotatelogs.exe ?
> >>
> >> If that doesn't lick it, what about using 'bin\rotatelogs.exe'?
> >>
> >> This might be a very odd case where a shell command's shell
> >> doesn't like
> >> forward slashes (cmd.exe is picky). I've actually worked
> out how to
> >> nest double quotes at one point, so that the command was
> >> quoted (useful
> >> for paths-in-spaces and forward slashes.)
> >>
> >> cmd.exe likes "c:/winnt/notepad.exe" or c:\winnt\notepad.exe
> >> and doesn't
> >> like c:/winnt/notepad.exe.
> >>
> >>
> ---------------------------------------------------------------------
> >> The official User-To-User support forum of the Apache HTTP
> >> Server Project.
> >> See <URL:http://httpd.apache.org/userslist.html> for more info.
> >> To unsubscribe, e-mail: users-unsubscribe [at] httpd
> >> " from the digest: users-digest-unsubscribe [at] httpd
> >> For additional commands, e-mail: users-help [at] httpd
> >>
> >>
> >
> >---------------------------------------------------------------------
> >The official User-To-User support forum of the Apache HTTP
> Server Project.
> >See <URL:http://httpd.apache.org/userslist.html> for more info.
> >To unsubscribe, e-mail: users-unsubscribe [at] httpd
> > " from the digest: users-digest-unsubscribe [at] httpd
> >For additional commands, e-mail: users-help [at] httpd
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe [at] httpd
> " from the digest: users-digest-unsubscribe [at] httpd
> For additional commands, e-mail: users-help [at] httpd
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


sanguis at xs4all

Oct 6, 2005, 9:15 AM

Post #6 of 6 (13052 views)
Permalink
RE: rotatelogs on Windows [In reply to]

> CustomLog "| D:\Progra~1\Apache~1\Apache\bin\rotatelogs.exe
> logs\access%Y_%m_%d_%H_%M_%S.log 86400 -300" common
>
> One more thing...when I did this, the hour, minute and seconds
> always show as 00_00_00, as in access_2005_10_04_00_00_00.log. Is
> that what you guys are seeing too? I guess the time doesn't start
> when you start the server, it treats it as if it's the beginning of
> the day?

It's the begin time of the current rotate interval.

Joost


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd

Apache users 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.