Re: Add ID by request in Error Logfile

Re: Add ID by request in Error Logfile

am 23.09.2010 17:33:34 von Rainer Jung

On 21.09.2010 16:45, marcos rebelo wrote:
> Hy all
>
> I would like to add one ID to every line of my error log file. Like
> this I could grep the log lines for every call
>
> in the access log I did:
> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
> \"%{User-Agent}i\" \"%{MY_REQUEST_ID}e\"" combined
>
> How may I do something similar in the error logfile?

In the forthcoming Apache 2.4 you will be able to configure the error
log format in a similar way to the access log. In 2.2.x there is no such
configuration. You would need to either change the code (function
log_error_core() in server/log.c) or use the available error_log_hook to
ad custom error logging. This requires some C hacking, see e.g.

http://svn.apache.org/viewvc?view=revision&revision=89281

and

http://www.mail-archive.com/modules-dev@httpd.apache.org/msg 02330.html

Regards,

Rainer

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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