This is not an answer, more a question to @lavoizer: I've written similar code to yours, which works for Classic Custom Log Tables. However, it does not work for Modern Custom Log Tables. It looks like a DCR maybe required. Have you got this working with Modern Custom Log Tables?