cats-effect
cats-effect copied to clipboard
Add setters for the failure and starvation reporters in IOApp
As promised in Discord. c.c. @armanbilge @djspiewak
I will fix tests if we decide to move forward with this approach. For now, I am more interested in gathering feedback about the proposal.
As reporter of https://github.com/typelevel/cats-effect/issues/3993 I'm wondering if the starvation reporter is anything special here.
Errors are usually reported by printing to sdterr (e.g., cats.effect.IOApp.onNonMainThreadDetected
), I was wondering if we should allow overriding the part that logs to the console/stderr (i.e., for redirection to a logger).
It is in that sense that I'm asking if starvation reporter is anything special, would it make sense to rather add (and allow overriding) something like def reportError(error: String): IO[Unit]
and call this to report starvation, non main thread detected and other issues?