(RADIATOR) AcctLogFileFormat

Hugh Irvine hugh at open.com.au
Wed Jul 16 21:27:14 CDT 2003


Hello Pedro -

You could add a pseudo-attribute to the current request which would 
contain the time string in whatever format you require. There are some 
example hooks in the file "goodies/hooks.txt" in the Radiator 
distribution.

regards

Hugh


On Thursday, Jul 17, 2003, at 08:23 Australia/Melbourne, 
pfig at co.sapo.pt wrote:

> hi!
>
> i noticed that there is no format string which gives the time from the 
> current packet in 0-padded format (for the packet timestamp radiator 
> supports %j; %k; %p, vs. %H; %M and %S for the current time, which are 
> 0-padded).
>
> we need the 0-padded behaviour in order to maintain compatibility with 
> the details generated by a very old and hacked merit server, which we 
> are phasing out. since i didn't find a way to do this in the config 
> file, i modified Util.pm:
>
> bash-2.05a$ diff Util.pm Util-pfig.pm
> 93,95c93,95
> <      'j', sub { return unless $ptime; @ptime = localtime($ptime); 
> $ptime[2] },
> <      'k', sub { return unless $ptime; @ptime = localtime($ptime); 
> $ptime[1] },
> <      'p', sub { return unless $ptime; @ptime = localtime($ptime); 
> $ptime[0] },
> ---
>>      'j', sub { return unless $ptime; @ptime = localtime($ptime);
> sprintf("%02d", $ptime[2]) },
>>      'k', sub { return unless $ptime; @ptime = localtime($ptime);
> sprintf("%02d", $ptime[1]) },
>>      'p', sub { return unless $ptime; @ptime = localtime($ptime);
> sprintf("%02d", $ptime[0]) },
>
> i'd rather do this via a hook, but i can't find out how. am i 
> overlooking something?
>
> our customer id is ptm.pt.
>
> cheers,
>
> Pedro Figueiredo (pfig at co.sapo.pt)
> http://sapo.pt/<mime-attachment>

NB: have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.

===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list