Appdaemon self.listen_log

I have a logging script in appdaemon that registers a callback:

self.handle_info = self.listen_log(self.cb, "INFO")

This callback used to catch log lines, format them and add them to the home assistant logbook, but this seems to have been broken for some time and I can’t seem to resolve why.

My debugging has shown that the self.listen_log line is getting called, but never returns. If it’s throwing, there’s no evidence of that either as I’ve tried catching and logging any exceptions but I get nothing back in the log.

Anyone else run in to this and have any clues? I’m pulling out my hair.

Did you end up solving this?

I’m experiencing the same issue. I was previously using listen_log to simply count warnings and errors, but the count has remained 0 (incorrectly) for a long time. The callback is never called. I’ve tested a bunch of different parameters, including defaults.

There aren’t any relevant issues on GitHub, which is surprising considering I would have thought listen_log would be widely used.