Originally posted by: flodstrom
You could also use the system log facility for this. In theory the AIX syslog can do all that you want to acomplish, but the problem might be in how to get it to log to the syslog? The amount of logging you seem to have may also be an issue?
Best would be if your application have native support for syslog, does it have that?
If the application does not have native support you could try with something like the following.
First instead of redirecting the output to a file, pipe it to the logger command. For example.
...WebLogic.sh $* | logger -plocal3.info
However, before you do this you should first set-up all the filters and rules for the syslog, especially for the "local3" facility (or whatever facility you choose). For example you probably don't want to flood the normal system log with the output of your application. An example config for the syslog (first line is default AIX6.1 entry with "local3.none" added):
*.debug;local3.none /var/log/aix/console.log rotate size 1M files 4
local3.debug /ibankapp/ibs/ebw.log rotate size 100M files 10
This would save 10 log files of 100MB each before the oldest one is deleted. Also, the normal system log would not receive any output from your application.
In your case you might even want to use the compress and archive functions, see the manpage for syslog.conf for more.
One thing though. I have never used the syslog to the scale of your problem so you have to test this first to see if it will fit your needs, or if it will even work. Use the logger command manually to see how it looks like and test the filters at the same time.
Just be carefull in case you manually manipulate active log files, you may have to "kill -HUP" the syslogd in order to resume logging. I think the same goes for changing/updating filter rules.