You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Okamoto Toshiaki <ok...@palette.plala.or.jp> on 2006/05/10 12:05:56 UTC

[users@httpd] [Question]error_log

Hi Alls:
I have two question about error_log.
1.ap_log_error()
I would like to output multiple line comments to error_log by
ap_log_error().
But, 5th argument is seemed to be escaped.
ap_log_error(..,"line1\nline2") ---> "..  line1\nline2" in error_log
Is it possible to be the following output?
".. line1[NL]
line2"
2.rotatelog
I would like rotate error_log by rotatelog.
For example, 6 generations.
error_log--->error_log.1--->error_log.2,,,error_log.5--->delete
Is it possible?

Many thanks.
T.Okamoto

---------------------------------------------------------------------
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] [Question]error_log

Posted by Joshua Slive <jo...@slive.ca>.
On 5/10/06, Okamoto Toshiaki <ok...@palette.plala.or.jp> wrote:
> Hi Alls:
> I have two question about error_log.
> 1.ap_log_error()
> I would like to output multiple line comments to error_log by
> ap_log_error().
> But, 5th argument is seemed to be escaped.
> ap_log_error(..,"line1\nline2") ---> "..  line1\nline2" in error_log
> Is it possible to be the following output?
> ".. line1[NL]
> line2"

No, I don't believe that is possible.  (It is possible to turn off the
escaping entirely with a compile-time define I believe.  You might
want to look at what mod_perl is doing, because they faced this
problem when the escaping was added.)

> 2.rotatelog
> I would like rotate error_log by rotatelog.
> For example, 6 generations.
> error_log--->error_log.1--->error_log.2,,,error_log.5--->delete
> Is it possible?

Yes, it works exactly the same as for the access log.  Just specify
"|/path/to/rotatelogs ..." in place of the filename.

Joshua.

---------------------------------------------------------------------
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