cats-effect icon indicating copy to clipboard operation
cats-effect copied to clipboard

Add setters for the failure and starvation reporters in IOApp

Open BalmungSan opened this issue 1 year ago • 1 comments

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.

BalmungSan avatar Feb 19 '24 23:02 BalmungSan

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?

fredfp avatar Mar 19 '24 12:03 fredfp