logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: Can't get mod_log_rotate to work
Author
rushtone



Joined: 25 Jan 2008
Posts: 5
Location: Georgia, USA

PostPosted: Wed 12 Mar '08 22:51    Post subject: Can't get mod_log_rotate to work Reply with quote

I've downloaded mod_log_rotate-1.00a-w32.zip, and followed the instructions in the ReadMe.txt for installation:

copy mod_log_rotate.so to my Apache's modules directory
I do run Apache 2.2.8 from ApacheLounge (but I've tried copying httpd.exe.manifest to bin anyway)
I've installed the Vis C++ 2005 runtime
LoadModule line (cut/paste from the ReadMe.txt) is there
Put the directives (per the ReadMe.txt) into httpd.conf

When I run httpd from the command line, it just silently exits a couple seconds after I start it. No error messages.

I've got all the mod_log_rotate specific things inside an
<IfModule log_config_module>
element, and when I put a typo inside that element httpd complains, so I know it's loading the module.

If I comment out all the Rotate* directives, leaving only the CustomLog line with an access log file name using strftime components and run httpd, it runs, but creates a log file called:

D:\somewhere\apache2.2\logs>dir access_*

Volume in drive D has no label.

Volume Serial Number is 7023-935C

Directory of D:\somewhere\apache2.2\logs

03/11/2008 08:33 AM 163 access_%Y%m%d-%H%M%s

1 File(s) 163 bytes
0 Dir(s) 15,276,609,536 bytes free

Which is not what I want.

Suggestions?

David
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7404
Location: EU, Germany, Next to Hamburg

PostPosted: Sat 15 Mar '08 21:48    Post subject: Reply with quote

Please post your config part about the logs.

it should work like
Code:

TransferLog "C:/Apache2/logs/%Y-%m-%d.access.log"
Back to top
rushtone



Joined: 25 Jan 2008
Posts: 5
Location: Georgia, USA

PostPosted: Wed 23 Apr '08 21:04    Post subject: Reply with quote

I've got
Code:
LoadModule log_rotate_module modules/mod_log_rotate.so


and then

Code:
<IfModule log_rotate_module>
    # mod_log_rotate configuration
    #CustomLog logs/access_%Y%m%d-%H%M%s combined
    TransferLog logs/access_%Y%m%d-%H%M%s
    #RotateLogs On
    #RotateLogsLocalTime On
    #RotateInterval 60
</IfModule>


I've tried it with the CustomLog as above, as well as TransferLog line, but in both cases I get an access file that's named exactly as it is in the config above, with percent signs and all, other than substituted values.

If I uncomment the "RotateLogs On" line, I get a Dr. Watson ("Apache HTTP Server has encountered a problem and needs to close").

David
Back to top
admin
Site Admin


Joined: 15 Oct 2005
Posts: 702

PostPosted: Wed 23 Apr '08 21:36    Post subject: Reply with quote

Strange.

First do not put httpd.exe.manifest in bin, C++ runtime does the job.

For tracking down your issue, please try first exactly the example from the docs:
Code:
LoadModule log_rotate_module modules/mod_log_rotate.so
RotateLogs On
RotateInterval 60

CustomLog logs/access_log.%Y%m%d-%H%M%S common

So not within a <ifModule element.
Back to top
rushtone



Joined: 25 Jan 2008
Posts: 5
Location: Georgia, USA

PostPosted: Wed 23 Apr '08 22:04    Post subject: Reply with quote

Hey, NOW it works. I commented out all the stuff I'd entered, and did just a cut/paste from the above.

Cool. Thanks. Just now wondering why it didn't work before....

David
Back to top


Reply to topic   Topic: Can't get mod_log_rotate to work View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules