-
-
Notifications
You must be signed in to change notification settings - Fork 569
Closed
Labels
Description
Currently on Cats Effect 3.4.8, the CPU starvation message gets logged like:
2023-04-17T10:18:37.277Z [WARNING] Your app's responsiveness to a new asynchronous
event (such as a new connection, an upstream response, or a timer) was in excess
of 5 milliseconds. Your CPU is probably starving. Consider increasing the
granularity of your delays or adding more cedes. This may also be a sign that you
are unintentionally running blocking I/O operations (such as File or InetAddress)
without the blocking combinator.
As it gets written as multi-line entry, it breaks logging.
Please consider to print it as single line.
Probably something like following would work:
private[this] def mkWarning(threshold: Duration)(when: FiniteDuration) =
s"""|${format(when)} [WARNING] Your app's responsiveness to a new asynchronous
| event (such as a new connection, an upstream response, or a timer) was in excess
| of $threshold. Your CPU is probably starving. Consider increasing the
| granularity of your delays or adding more cedes. This may also be a sign that you
| are unintentionally running blocking I/O operations (such as File or InetAddress)
| without the blocking combinator.""".stripMargin.replaceAll("\n", "")Reactions are currently unavailable