Re: Where is access.log generated

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

 



Arthur,

On Jan 2, 2007, at 4:13 PM, Arthur Kreitman wrote:

I can’t find where the writes to access.log are called?  Any hints?

Looking through the Apache source code, the access log entries are generated by the ap_hook_log_transaction hook, which is implemented by modules/loggers/mod_log_config.c and ran from several possible places in server/protocol.c (and server/eor_bucket.c). I dearly hope only one of those code paths actually gets followed during a given transaction. (:

If you have your own module, you can implement ap_hook_log_transaction and add to the access log yourself.

Yes, hooks can be somewhat untraceable in Apache, but in the Apache source distribution, all hooks (save one) that are defined are actually called. The pattern is:

* To declare a hook handler, you call ap_hook_mumble from your
  register_hooks function implementation
* To run the hook, Apache calls ap_run_mumble.

So, to find out about logging, I used find and grep:

[sctemme@graymalkin] trunk $ find . -type f -name \*.c | xargs grep ap_hook_log_transaction
...
[sctemme@graymalkin] trunk $ find . -type f -name \*.c | xargs grep ap_run_log_transaction
...

(output omitted but easily obtained).

S.

--
sctemme@xxxxxxxxxx            http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF


Attachment: smime.p7s
Description: S/MIME cryptographic signature


[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