Logging directly e-mail?

Hi,
Has anyone uses a script that makes:
for example:
If max logging entry is 5000
after 5000th entry
those entries will be saved.
Entry table will be cleared.
Saved entries will be sended to specified e-mail address.

If someone can also write this script I would be so thankful…

i would suggest you to setup remote logging, so you get all the information. That way it could be easer and use less resources. Also, you could feed these logs directly in some log reader, so you can see changes, see deviation from normal.