Update logger.sh

Adding the automatic rotation of old logs, customisable by variable