radius.log with timestamp in filename
Hi all, I'm using FreeRADIUS Version 2.0.4 and i would like to have timestamps within the filename of the radius.log, i.e. radius.log-20090804. For the other logfiles, like the detailfile, this is the default setting in the radiusd.conf: detailfile = ${radacctdir}/%{Client-IP-Address}/detail-%Y%m%d In good faith I have tried the same thing with the radius.log... file = ${logdir}/radius.log-%Y%m%d but it didn't work. Freeradius then creates a logfile with the explicit name radius.log-%Y%m%d, but not with the timestamp of the actual day. Can anyone help? Thanks in advance! -- View this message in context: http://www.nabble.com/radius.log-with-timestamp-in-filename-tp24804436p24804... Sent from the FreeRadius - User mailing list archive at Nabble.com.
RadiusGuy wrote:
In good faith I have tried the same thing with the radius.log...
file = ${logdir}/radius.log-%Y%m%d
but it didn't work. Freeradius then creates a logfile with the explicit name radius.log-%Y%m%d, but not with the timestamp of the actual day. Can anyone help?
Write a cron job to rename the file. Dynamically expanding the filename for *every* log message is an enormous waste of time. The filename changes only once a day, so it should be renamed only once a day. Alan DeKok.
On 08/04/2009 06:10 AM, Alan DeKok wrote:
RadiusGuy wrote:
In good faith I have tried the same thing with the radius.log...
file = ${logdir}/radius.log-%Y%m%d
but it didn't work. Freeradius then creates a logfile with the explicit name radius.log-%Y%m%d, but not with the timestamp of the actual day. Can anyone help?
Write a cron job to rename the file.
Or better yet use logrotate. logrotate will rename your log files on a schedule you specify using a name you specify. Read the man page for more info. -- John Dennis <jdennis@redhat.com> Looking to carve out IT costs? www.redhat.com/carveoutcosts/
participants (3)
-
Alan DeKok -
John Dennis -
RadiusGuy