Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My mod_jk.log gets 2MB bigger in an hour and all it has entries like :

[Mon Aug 13 10:51:28 2012] ajp13 www.my_site.com 0.690152
[Mon Aug 13 10:51:28 2012] ajp13 www.my_site.com 0.002675
[Mon Aug 13 10:51:29 2012] ajp13 www.my_site.com 0.000794
[Mon Aug 13 10:51:30 2012] ajp13 www.my_site.com 0.001993
[Mon Aug 13 10:51:30 2012] ajp13 www.my_site.com 0.000764
[Mon Aug 13 10:51:35 2012] ajp13 www.my_site.com 0.004724

So, how can I disable this logging completely?

Currently I have set logLevel to info in configuration file. Apache tomcat doc suggests, error/debug/info are only valid option.

Please help.

Also how can I rotate log after one day? Currently it's being rotated after week by default (I did not write/change anything for that).

Thanks.

share|improve this question
    
Setting log level to error might decrease log size. I you really want to disable it, you can try JkLogFile /dev/null. Changing how log files are rotated might depend on your os (if you installed modjk from packages). Can you provide information about it? –  coincoin Aug 13 '12 at 9:46

1 Answer 1

up vote 1 down vote accepted

So, how can I disable this logging completely?

Point it to /dev/null:

JkLogFile           /dev/null
JkLogLevel          info

Also how can I rotate log after one day? Currently it's being rotated after week by default (I did not write/change anything for that).

Add a daily directive to the /etc/logrotate.d/httpd:

/var/log/httpd/*log {
    missingok
    notifempty
    daily
    sharedscripts
    postrotate
        /sbin/service httpd reload > /dev/null 2>/dev/null || true
    endscript
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.