You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Garg, Saman" <Sa...@intuit.com> on 2010/09/13 13:14:53 UTC

[users@httpd] Apache mod-jk log rotate issue

Hi All,

I am trying to implement apache mod-jk logrotate using apache
"rotatelogs" program. Below is the entry that I have made in mod-jk
config file where <apache_home> and <log_location> values are correctly
specified.

----------------------------
JkLogFile "|/<apache_home>/bin/rotatelogs
/<log_location>/mod_jk.log.%Y-%m-%d-%H_%M_%S 86400"
JkLogLevel error
----------------------------
The problem here is after making above entries, when I do the apache
restart for the first time, it doesn't create the new mod-jk log file.
But when I change the log level to "info", it does create the mod-jk log
file. 
------
JkLogLevel info
------

When log level was set to "error", it waits for error to happen and
should automatically create the mod-jk file at that time? Contrary to
that, I tried to send the error message to update mod-jk log, but it
still didn't create the mod-jk log. 

Could somebody please help? 

Thanks

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache mod-jk log rotate issue

Posted by Jeff Trawick <tr...@gmail.com>.
On Mon, Sep 13, 2010 at 7:14 AM, Garg, Saman <Sa...@intuit.com> wrote:

> Hi All,
>
> I am trying to implement apache mod-jk logrotate using apache
> "rotatelogs" program. Below is the entry that I have made in mod-jk
> config file where <apache_home> and <log_location> values are correctly
> specified.
>
> ----------------------------
> JkLogFile "|/<apache_home>/bin/rotatelogs
> /<log_location>/mod_jk.log.%Y-%m-%d-%H_%M_%S 86400"
> JkLogLevel error
> ----------------------------
> The problem here is after making above entries, when I do the apache
> restart for the first time, it doesn't create the new mod-jk log file.
> But when I change the log level to "info", it does create the mod-jk log
> file.
> ------
> JkLogLevel info
> ------
>
> When log level was set to "error", it waits for error to happen and
> should automatically create the mod-jk file at that time? Contrary to
> that, I tried to send the error message to update mod-jk log, but it
> still didn't create the mod-jk log.
>
> Could somebody please help?
>

rotatelogs doesn't create the file until it has something to write.

Perhaps your attempt to cause mod_jk to write an error message was
unsuccessful, such that rotatelogs had nothing to write.