0

Trying to use log4j and the java utility logging in a single application but on different classes but log4j stops logging once I configure util logging on another class.

I am loading the properties file for the util logging whereas the xml file is for log4j config is in the classpath.

How can I configure both?

10
  • It is definitively be possible to do both. You should add how you configure your logging to the question. Do you use code, xml or .properties? And how is your configuration loaded? Commented Dec 8, 2017 at 9:16
  • @Mathjoh: I've added a little more detail now. Commented Dec 8, 2017 at 9:34
  • It's possible, but stupid. Interestingly enough, using java.util.logging itself is quite stupid, so unless you're forced for some unknown reason to use it, don't. Commented Dec 8, 2017 at 9:46
  • 1
    Provide a minimal code/configuration example that others can run to reproduce your problem. Commented Dec 9, 2017 at 16:03
  • 1
    @Kayaman Using java.util.logging is not stupid and the link you refer to in support of not using it is now quite out of date. Java util logging has come a long way recently with the addition of new Java 8 features which means that it now performs very well. Commented Dec 15, 2017 at 16:44

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.