-1

I have a multi-module maven project with one root and multiple child projects. I am planning to use SL4J for logging. However, I have to place the log4j.properties in all child projects to be able to configure log4j.

To be able to reuse a single properties file, I tried keeping the file in src\main\resources directory of the root. However, sl4j complains that it cannot find the properties file unless it exists in each individual project.

Is it possible what I am trying to do? If so, how do I do that?

Babu James
  • 2,740
  • 4
  • 33
  • 50

1 Answers1

0

The 'distributable' is responsible for the final log4j.properties, not every dependency is has. However, tests will probably complain about the absence of this file, so put a version of log4j.properties under src/test/resources.

Robert Scholte
  • 11,889
  • 2
  • 35
  • 44