You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jean-Philippe Bouchard <je...@sitepak.com> on 2001/02/02 18:20:58 UTC

[PATCH] (mod_log_config.c): to log in client timezone

Hello everybody,
	I'm new to new-httpd@apache.org as of a few minutes ago. I'm also new
to the apache API. I wrote a patch yesterday to be able to do 2 things:
1) have apache log in the client timezone
2) have apache log in a logfile named according to the day in the client
timezone
	In order to do so, I changed the CustomLog directive to take a new
optional parameter that I call TZ=. So, now CustomLog takes RAW_ARGS
instead of TAKE23. I also modified the processing of the log file name
so that it will accept optional strftime converstion specifiers. Here is
an example of the new usage of the CustomLog directive:

CustomLog /usr/local/apache_mm/logs/icuser1/%Y/%m/%d-%m-%Y.log common
TZ=Europe/Paris

	By restarting apache every hour, we can have it switched log files
automatically according to the client timezone.
	Would this new feature be actually useful in general?

Regards.

P.S.: I tested the patch and it seems to work but there are possibly
bugs in it as I am quite new to the API.
-- 
---------------------------------
Jean-Philippe Bouchard            
Sitepak - http://www.sitepak.com/ 
jeanphil@sitepak.com              
---------------------------------

Re: [PATCH] (mod_log_config.c): to log in client timezone

Posted by Jean-Philippe Bouchard <je...@sitepak.com>.
"William A. Rowe, Jr." wrote:
> 
> Does this patch accept quoted filenames?  e.g.
> 
> CustomLog "c:/apache_mm/logs/icuser1/%Y/%m/%d-%m-%Y.log" common TZ=Europe/Paris

Yes.
 
> Also, can TZ be specified simply in +-nnnn form?

Yes.
 
> We have generally held a policy that further customization of the
> log files is for an external application.  But when it assists i18n
> for little to no cost, I'm +1.
> 
> Bill
> 
> > -----Original Message-----
> > From: root@mtlweb01.goltier.com [mailto:root@mtlweb01.goltier.com]On
> > Behalf Of Jean-Philippe Bouchard
> > Sent: Friday, February 02, 2001 11:21 AM
> > To: new-httpd@apache.org
> > Subject: [PATCH] (mod_log_config.c): to log in client timezone
> >
> >
> > Hello everybody,
> >       I'm new to new-httpd@apache.org as of a few minutes
> > ago. I'm also new
> > to the apache API. I wrote a patch yesterday to be able to do
> > 2 things:
> > 1) have apache log in the client timezone
> > 2) have apache log in a logfile named according to the day in
> > the client
> > timezone
> >       In order to do so, I changed the CustomLog directive to
> > take a new
> > optional parameter that I call TZ=. So, now CustomLog takes RAW_ARGS
> > instead of TAKE23. I also modified the processing of the log file name
> > so that it will accept optional strftime converstion
> > specifiers. Here is
> > an example of the new usage of the CustomLog directive:
> >
> > CustomLog /usr/local/apache_mm/logs/icuser1/%Y/%m/%d-%m-%Y.log common
> > TZ=Europe/Paris
> >
> >       By restarting apache every hour, we can have it
> > switched log files
> > automatically according to the client timezone.
> >       Would this new feature be actually useful in general?
> >
> > Regards.
> >
> > P.S.: I tested the patch and it seems to work but there are possibly
> > bugs in it as I am quite new to the API.
> > --
> > ---------------------------------
> > Jean-Philippe Bouchard
> > Sitepak - http://www.sitepak.com/
> > jeanphil@sitepak.com
> > ---------------------------------

-- 
---------------------------------
Jean-Philippe Bouchard            
Sitepak - http://www.sitepak.com/ 
jeanphil@sitepak.com              
---------------------------------

RE: [PATCH] (mod_log_config.c): to log in client timezone

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Does this patch accept quoted filenames?  e.g. 

CustomLog "c:/apache_mm/logs/icuser1/%Y/%m/%d-%m-%Y.log" common TZ=Europe/Paris

Also, can TZ be specified simply in +-nnnn form?

We have generally held a policy that further customization of the
log files is for an external application.  But when it assists i18n
for little to no cost, I'm +1.

Bill


> -----Original Message-----	
> From: root@mtlweb01.goltier.com [mailto:root@mtlweb01.goltier.com]On
> Behalf Of Jean-Philippe Bouchard
> Sent: Friday, February 02, 2001 11:21 AM
> To: new-httpd@apache.org
> Subject: [PATCH] (mod_log_config.c): to log in client timezone
> 
> 
> Hello everybody,
> 	I'm new to new-httpd@apache.org as of a few minutes 
> ago. I'm also new
> to the apache API. I wrote a patch yesterday to be able to do 
> 2 things:
> 1) have apache log in the client timezone
> 2) have apache log in a logfile named according to the day in 
> the client
> timezone
> 	In order to do so, I changed the CustomLog directive to 
> take a new
> optional parameter that I call TZ=. So, now CustomLog takes RAW_ARGS
> instead of TAKE23. I also modified the processing of the log file name
> so that it will accept optional strftime converstion 
> specifiers. Here is
> an example of the new usage of the CustomLog directive:
> 
> CustomLog /usr/local/apache_mm/logs/icuser1/%Y/%m/%d-%m-%Y.log common
> TZ=Europe/Paris
> 
> 	By restarting apache every hour, we can have it 
> switched log files
> automatically according to the client timezone.
> 	Would this new feature be actually useful in general?
> 
> Regards.
> 
> P.S.: I tested the patch and it seems to work but there are possibly
> bugs in it as I am quite new to the API.
> -- 
> ---------------------------------
> Jean-Philippe Bouchard            
> Sitepak - http://www.sitepak.com/ 
> jeanphil@sitepak.com              
> ---------------------------------