justintime
justintime

Reputation: 3631

Overview of log4j configuration

I am rather confused by how to configure Log4j I have picked up following snippets, but something written that pulls these concepts together would be useful.

I want to be able to

Upvotes: 0

Views: 227

Answers (1)

Miserable Variable
Miserable Variable

Reputation: 28761

According to this documentation

The existing configuration is not cleared nor reset.

log4j itself stops at the first log4j.properties it find.

So when you call configure, my guess is:

  • if some configuration is already done then the current will be merged.
  • if configuration has not been done then log4j will not attempt to read any other log4j.properties

Your best best is to probably call configure with global and then with developer-specific file. But this should be easy to test.

Upvotes: 1

Related Questions