I'm making a Maven-based java library which the logging used is this:
import java.util.logging.Logger;
private static final Logger LOG
= Logger.getLogger(MyLibraryClass.class.getName())
I have coded so many log in this library, that is very useful in debugging the flow of the library, specially during JUnit tests, however this app I created, I don't want it to show the logs to a client application (an application that will use this library). Since it is too verbose.
How do I control which gets logged into a client application's log view. Logs like INFO level
from the library does not necessarily show up in the client/sample app?
Here is my ultimate goal:
- To have a log as verbose as possible when running Unit test in the library project
- But not show these "verbose" logs to the client application, without the need for the client application to deliberately configure/suppress the logs from the library
Client library - is the project that is used by a Java application; which is the project I am working on. Which generates logs that should not be displayed in the client application.
Client application - is the project/application that uses the Java library