Simple logging options for debugging?

What do you use when you want to debug your scripts and automations? I find both the Log and History UI screens are unbearably slow to the point I’d rather send emails instead of using them. But that isn’t an attractive option. I’ve tried playing with “logger” but I can only seem to write to the error log (or at least see results appear there)

What do you use? Is there a simple way of writing to a plaintext file via a service call? Preferably something using reflection where you can call Mylog(“message”) from within the automation and the log will report the name of the automation or script, the datetime, what triggered the automation or script along with the message.

Would love to know if there’s a more straight forward way of debugging automations/scripts/etc. Given how robust the system is, I feel like I’m just missing something very obvious :dizzy_face:

You can log to a file using the file notify integration:

Or you can log directly to the HA log using the logbook.log service: