We want customers to be able to control the logging level in our client JR. What is the best way to do this?
We currently have only a few statements that write to System.out. I know Log4J will solve this problem, though one of our biggest clients does not use Log4J and uses its custom logging implementation. Is there a clean approach to entering our client jar?
The option we have considered: To set the logging level for clients, client can set special properties on jar classes (do not like it), our client jar can read an alternative . The properties file that clients can keep on their class (better but still a bit of a pain).
Do not use a solid logging framework, so that you can exchange logging if You need it for the first time I start changing my system. Out was included in java.util.logging.
If your customer uses any other logging framework, then either there is a bridge slf4j or you can write your own too.
EDIT: We used it to simplify the entry of those external libraries which LOG4J is used in java.util.loogging which we use.
No comments:
Post a Comment