Page 1 of 1
Log filename as specified in log block
Posted: Fri Aug 10, 2007 3:28 am
by RusselB
Is it possible to have the log filename automatically changed, so that I get a different log for each day, (preferably with the filename of the log containing the date for that log).
Eg: Ircd-07-01-2007.log would be the log for July 1st 2007.
If this is possible, I would appreciate direction on how to do so.
Re: Log filename as specified in log block
Posted: Fri Aug 10, 2007 3:59 am
by Stealth
If you're running Unreal on *nix, make a cron job and a small script to rename the file to what you please... If you're on WIndows, I don't know how I would go about doing that.
Re: Log filename as specified in log block
Posted: Fri Aug 10, 2007 4:04 am
by Stealth
A quick bit of research, and here is a nice cron line I just made:
Code: Select all
59 23 * * * mv /path/to/ircd.log /path/to/ircd.$(date +%Y%m%d).log
This will rename your logfile at 11:59pm each night to include that days date.
Re: Log filename as specified in log block
Posted: Fri Aug 10, 2007 4:55 am
by RusselB
Thanks for the fast reply, Stealth.
We are running on *nix
Regretfully I'm still learning about this, so I'll pass your suggestion on to the person that is teaching me, as I don't have a clue as to where that would go.
Re: Log filename as specified in log block
Posted: Fri Aug 10, 2007 5:25 am
by Stealth
That will allow you to edit the crontab for your user (usually in vi). Just drop the line in there, save, and watch it work
