This may help as a start.
This is not perfect as I am not a programmer. Maybe someone can morph this into real code.
Basically this script is doing two things, first it goes throught the messages log and copies out each users info for pure-ftpd and puts it in there tmp directory. The second part looks for anonymous ftp logins and copies that info to a file called anon_ftplog
[SCRIPT]
#!/bin/sh
cd /var/cpanel/users
for file in *
do
cd /home/$file/tmp
grep pure-ftpd /var/log/messages|grep $file &ftplog
chown $file:$file /home/$file/tmp/ftplog
if test ! -d '/var/log/ftp'; then
mkdir '/var/log/ftp'
fi
cd /var/log/ftp
grep pure-ftpd /var/log/messages |grep Anonymous &anon_ftplog
done
[ENDSCRIPT]
Thoughts and suggestions are welcome. I have tested this on a couple of servers and have not had anything bad happen. :p