I second, what moritz said. It's even better to let an external mechanism watch over your process (e.g Solaris Service Management Facility or the Daemon::-Modules from CPAN).
However, if you insist to follow that path, the following entries from the FAQ should point you in the right direction to implement your own appender:
HTH
In reply to Re: [Log4perl] adding actions to messages
by Perlbotics
in thread [Log4perl] adding actions to messages
by menth0l
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |