In Cisco ASA you can writing internal log buffer only iternal flash memory or ftp server. That script can copying logs to external flash memory and deleting logs from internal flash.