Server side log cleanup

Made the server clean up the buffered logs every 30s.