The lines on the log are not deletable selectively.
At least set the log memory to 1 lines and back to 1000 delete all the 999 old...
This script save the last checked log for start from that point instead to elaborate all list everytime:
:global lastLog
:if ([:typeof $lastLog] != "num") do={:set lastLog 0}
{
[...]
:local id2num do={:return [:tonum "0x$[:pick $1 1 [:len $1]]"]}
[...]
/log
:foreach item in=[find where ([$id2num $".id"] > $lastLog)] do={
:set lastLog [$id2num $item]
[...]
}
[...]
}