0

I am examining a high-volume Apache prefork site and noticing that many log entries such as:

CustomLog '|/foo/bar/cronolog -foo -bar'
RewriteLog '|/foo/bar/cronolog -bar -foo'

When apache logs the request or the rewrite is cronolog spawned for EACH request or is the pipe opened and written-to for the lifetime duration of the preforked apache process?

(This was asked on stackoverflow but I'll remove from there as more applicable here I think.)

Jé Queue
  • 363
  • 1
  • 3
  • 10

1 Answers1

1

It is spawned once per CustomLog directive.

So on my server where I use these two directives in the global scope only one copy of cronolog started and used for writing logs.

LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combinedvhost
CustomLog "|/usr/bin/cronolog /var/log/apache2/%Y%m.combined.allhosts.log" combinedvhost
Zoredache
  • 128,755
  • 40
  • 271
  • 413
  • OK, thank you. What this means I hope is that all forked processes would dup() the pipe? Curious how it synchronizes record output. Where I'm going with that: is there a performance hit with a lot of CustomLog's? – Jé Queue Apr 29 '10 at 17:48