On Tue, Jan 13, 2004 at 01:39:20PM -0500, Gainey, Joe (AT-Atlanta) wrote:
it would be nice if there was an option:
destination d_default { file("/var/adm/messages.$YEAR.$MONTH.$DAY" soft_link("/var/adm/messages")) ; } ;
That is a nice idea! But until someone writes a patch for it, you might want to try my "loglinks" script (see attached) which should simplify the process. I wrote it for a central syslog server so that I could do this: loglinks /log/hosts /log/archive/hosts/BASENAME/%Y/%m/BASENAME.%Y.%m.%d host1 host2 [..] Which means that /log/hosts/HOSTNAME is always pointing to the right file in /log/archive/hosts/HOSTNAME/........ In your environment, I think the following work if you run it just after midnight out of cron: loglinks /var/adm /var/adm/BASENAME.%Y.%m.%d messages notices maillog Assuming that you're symlinking to those three logfiles. Experiment with it by setting "LOGLINKS_DEBUG=YES" in your environment and it'll just print the symlinks it would create instead of actually calling "ln -s". -- Ed