You bet.
This is another, cleaner way of doing it that allows you to turn it on and off in the appserver.config file, so you don’t need to go back and clean your code up by removing/commenting out the diagnostic lines.
I’m too lazy to set it up, honestly, lol. How to write your own trace logs - Experts’ Corner - Epicor User Help Forum (epiusers.help)