httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: [users@httpd] Add ID by request in Error Logfile
Date Thu, 23 Sep 2010 15:33:34 GMT
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/msg02330.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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message