Re: Add ID by request in Error Logfile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx/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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux