Re: Add ID by request in Error Logfile

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 [at] httpd.apache.org/msg 02330.html

Regards,

Rainer

------------------------------------------------------------ ---------
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 [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Rainer Jung [ Do, 23 September 2010 17:33 ] [ ID #2048453 ]
Webserver » gmane.comp.apache.user » Re: Add ID by request in Error Logfile

Vorheriges Thema: proxy
Nächstes Thema: Re: https and http server with the same documentRoot+ force to use https for some content and authen