Re: Virtual Host Logging Perl Script (mod_macro note)

2003-07-16 Thread Jez Hancock
On Wed, Jul 16, 2003 at 12:40:10PM -0700, Marc M. Adkins wrote: > > > Right now it seems a bit silly having a separate ErrorLog line in each > > > of the apache virtual host stubs, but as far as I am aware there isn't > > > an easier way is there? > > > > You could look at mod_macro. > mod_macro (h

Re: Virtual Host Logging Perl Script

2003-07-16 Thread Jez Hancock
On Wed, Jul 16, 2003 at 07:37:21PM +0100, Ged Haywood wrote: > Hi Jez, > > On Wed, 16 Jul 2003, Jez Hancock wrote: > > > [snip] We started looking at mod_log_sql: [snip] > > but had trouble getting it to work on FreeBSD unfortunately. > > I'd have thought something a bit lighter might do for thi

RE: Virtual Host Logging Perl Script (mod_macro note)

2003-07-16 Thread Marc M. Adkins
> > Right now it seems a bit silly having a separate ErrorLog line in each > > of the apache virtual host stubs, but as far as I am aware there isn't > > an easier way is there? > > You could look at mod_macro. mod_macro (http://www.coelho.net/mod_macro) works great for me. I found that I had to

Re: Virtual Host Logging Perl Script

2003-07-16 Thread Ged Haywood
Hi Jez, On Wed, 16 Jul 2003, Jez Hancock wrote: > [snip] We started looking at mod_log_sql: [snip] > but had trouble getting it to work on FreeBSD unfortunately. I'd have thought something a bit lighter might do for this. > Right now it seems a bit silly having a separate ErrorLog line in each

Re: Virtual Host Logging Perl Script

2003-07-16 Thread Jez Hancock
On Wed, Jul 16, 2003 at 12:40:06PM +0200, Guillaume Fougnies wrote: > Wed, Jul 16, 2003 at 11:07:47AM +0100: Jez Hancock wrote: > > I would do this but we wanted to give our users 'live' logfiles, rather > > than making them wait until log rotation before being able to view them > > (or did I misun

Re: Virtual Host Logging Perl Script

2003-07-16 Thread Guillaume Fougnies
Hi, Wed, Jul 16, 2003 at 11:07:47AM +0100: Jez Hancock wrote: > Hi Ged, > > On Wed, Jul 16, 2003 at 07:06:43AM +0100, Ged Haywood wrote: > > On Tue, 15 Jul 2003, Jez Hancock wrote: > > > Does anyone how one could log errorlog entries in a similar manner to > > > the script above - ie pipe the err

Re: Virtual Host Logging Perl Script

2003-07-16 Thread Jez Hancock
Hi Ged, On Wed, Jul 16, 2003 at 07:06:43AM +0100, Ged Haywood wrote: > On Tue, 15 Jul 2003, Jez Hancock wrote: > > Does anyone how one could log errorlog entries in a similar manner to > > the script above - ie pipe the errorlog to a script which appends one > > copy of the error entry to a main e

Re: Virtual Host Logging Perl Script

2003-07-15 Thread Ged Haywood
Hi there, On Tue, 15 Jul 2003, Jez Hancock wrote: > Does anyone how one could log errorlog entries in a similar manner to > the script above - ie pipe the errorlog to a script which appends one > copy of the error entry to a main error logfile and another copy to the > virtual host's error logfil

Re: Virtual Host Logging Perl Script

2003-07-15 Thread Stas Bekman
Perrin Harkins wrote: On Tue, 2003-07-15 at 16:11, Stas Bekman wrote: Is this still correct in the threaded environment where the filehandle is shared across several threads? Why would the filehandle be shared? Wouldn't you open a new handle in each thread? Because it's shared on the OS level.

Re: Virtual Host Logging Perl Script

2003-07-15 Thread Jez Hancock
On Tue, Jul 15, 2003 at 02:39:18PM -0400, Perrin Harkins wrote: > On Tue, 2003-07-15 at 14:27, Jez Hancock wrote: > > Much obliged, that does look to be something I could use. Reminds me I > > need to be locking the logfile as well ;) > > Actually, if you are just printing one short line I think

Re: Virtual Host Logging Perl Script

2003-07-15 Thread Perrin Harkins
On Tue, 2003-07-15 at 16:11, Stas Bekman wrote: > Is this still correct in the threaded environment where the filehandle is > shared across several threads? Why would the filehandle be shared? Wouldn't you open a new handle in each thread? I expect this would be fine, since the behavior is enfo

Re: Virtual Host Logging Perl Script

2003-07-15 Thread Stas Bekman
Perrin Harkins wrote: On Tue, 2003-07-15 at 14:27, Jez Hancock wrote: On Tue, Jul 15, 2003 at 01:32:11PM +0300, Stas Bekman wrote: Take a look at: http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlLogHandler a similar code will work for mp1 if you don't use 2.0. Much obliged, that does

Re: Virtual Host Logging Perl Script

2003-07-15 Thread Perrin Harkins
On Tue, 2003-07-15 at 14:27, Jez Hancock wrote: > On Tue, Jul 15, 2003 at 01:32:11PM +0300, Stas Bekman wrote: > > Take a look at: > > http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlLogHandler > > a similar code will work for mp1 if you don't use 2.0. > Much obliged, that does look to

Re: Virtual Host Logging Perl Script

2003-07-15 Thread Jez Hancock
On Tue, Jul 15, 2003 at 01:32:11PM +0300, Stas Bekman wrote: > Jez Hancock wrote: > >My question is: would it be possible to use mod_perl in some way to > >perform the function of the script? In testing the speed of the script > >seems reasonable enough, is there a better way to do what I'm doing

Re: Virtual Host Logging Perl Script

2003-07-15 Thread Stas Bekman
Jez Hancock wrote: Hi, I've just written a short perl script to perform logging for our virtual hosts. The code has plenty of comments so I'll paste it below. My question is: would it be possible to use mod_perl in some way to perform the function of the script? In testing the speed of the scrip

Virtual Host Logging Perl Script

2003-07-14 Thread Jez Hancock
Hi, I've just written a short perl script to perform logging for our virtual hosts. The code has plenty of comments so I'll paste it below. My question is: would it be possible to use mod_perl in some way to perform the function of the script? In testing the speed of the script seems reasonable

Virtual Host Logging Perl Script

2003-07-14 Thread Jez Hancock
Hi, I've just written a short perl script to perform logging for our virtual hosts. The code has plenty of comments so I'll paste it below. My question is: would it be possible to use mod_perl in some way to perform the function of the script? In testing the speed of the script seems reasonable