Do I need to worry about logging to console, using Slf4j on top of Logback, being a blocking operation?
I wasn't sure, so I've been using reactor.logback.AsyncAppender
from io.projectreactor.addons:reactor-logback:3.2.3-RELEASE
The issue I have now is that I can't compile my code using Maven as there's a transitive dependency on com.sun.java:tools:11-internal
that can't be satisfied. I'm not sure how to rectify this issue, so now questioning do I even need this library.
Using Spring-boot 2.1.4-RELEASE and OpenJDK 11.0.3 with Maven 3.6.0
Maven error:
[ERROR] Failed to execute goal on project yooblr-web: Could not resolve dependencies for project com.yooblr:yooblr-web:jar:1.0.0-SNAPSHOT: Could not find artifact com.sun.java:tools:jar:11.0.3 at specified path /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/../lib/tools.jar -> [Help 1]
ch.qos.Logback.classic.AsyncAppender
can be suitable in your case. It asynchronously delegates logging to regular appenders without blocking the main thread of execution.
Its pros/cons are pretty well described in the following SO thread:
When not to use AsyncAppender in logback by default
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With