Forum Moderators: phranque

Message Too Old, No Replies

Want to split my log files in real time for one site

         

smiddy

10:53 pm on Feb 3, 2006 (gmt 0)

10+ Year Member



I have a site that is dual purpose. Half of the site gets a lot of requests out of a certain folder (forum) and the other half of the site gets requests for static information from everywhere. Is there a way to get to access log files realtime? One for the forum and one for the static requests. The forum requests would be out of one folder under the root, while everything else would be logged elsewhere.

bcc1234

11:00 pm on Feb 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, do some reading on setting environment variables based on the path of the request and then log directives based on those env's.

Here are a couple of lines from one of my sites.
They exclude logging of livehelp requests.

SetEnvIf Request_URI "^/livehelp.*$" dontlog
CustomLog /home/gg/log/httpd-access.log combined env=!dontlog

You would need a pair of such statements, one excluding the other's dirs.

smiddy

11:05 pm on Feb 3, 2006 (gmt 0)

10+ Year Member



So these statements could be put together under the same virtual server statement? Just different names for the log?

smiddy

11:07 pm on Feb 3, 2006 (gmt 0)

10+ Year Member



Also, one directory is a parent of the other.?

bcc1234

8:33 pm on Feb 4, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can combine them any way you want and apply to any paths.