Hello,
You could follow
this article to configure the described functionality. You would simply check the current document class and if it is your custom document disable the logging. Would this approach work for you?
Please let me know if you have any questions.
Best Regards,
Sandro