how to dynamically set report configuration variables (was: Re: how to add a superservice ...)

Francis J. Lacoste flacoste at logreport.org
Sun Oct 27 17:40:40 CET 2002


On ven, 2002-10-25 at 15:24, Joost van Baal wrote:
> 
> However, all this doesn't look really attractive.  I guess using a
> yet-to-be-written date-splitter would be better.  E.g. something like this:
> 
>  lr_split_date --chunk=daily --timestamp=3 < log
> 
> lr_split_date splits stdin into a number of files, named after the timerange
> they report on.  The files are created in the current working directory.
> 
> --chunk  one of `daily' (files are named e.g. 2002-10-25), `weekly' (files are
>          named e.g. 2002-W13), `monthly' (files are named e.g. 2002-03), etc.
> --timestamp  either `syslog': a timestamp used by syslog created files, lines
>          look like e.g. `Oct 25 21:01:36', and are found at the start of each
>          line; or e.g. `7' (or any other digit): a timestamp is expected at
>          field 7 of each line, in seconds since unix epoch format.
> 
> Such a filter would be very helpful, no changes to any Lire script would be
> needed, and your problem would be solved (I guess).

Well, you can already achieve this with the experimental SQL support:

lr_sql2dlf www start_time end_time 

> 
> (Yet _another_ way to tackle it would be to allow something like
> 
>  requests-by-period          period=$LR_WWW_REPORT_PERIOD
> 
> instead of
> 
>  requests-by-period          period=1d
> 
> in e.g. the www.cfg report configuration file.  Parameter assignment statements
> would be subject to shellexpansion.  I believe this would need a change to the
> &Lire::ReportConfig::parse_param_line() code.  I don't know if this would be a
> sane thing to do, perhaps Francis Lacoste can share some light on it.
> 

The new configuration API will allows overriding all configuration 
variables with command line arguments.

Francis J. Lacoste

-- 
Francis J. Lacoste              . .           http://www.logreport.org
/^LogReport$/               . .               flacoste at logreport.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.logreport.org/pipermail/development/attachments/20021027/48ebc6ae/attachment.bin 


More information about the Development mailing list