dawidklos
dawidklos

Reputation: 922

log4j2.xml path Configuration

I created maven project from console, added dependencies and so on. I want to configure my logging with log4j2.xml file. I found on FAQ this, but when i put -Dlog4j.configurationFile=path/to/log4j2.xml in cmd it doesn't work. What should I do

Upvotes: 1

Views: 2326

Answers (1)

SparkOn
SparkOn

Reputation: 8946

As you said it is a maven project, You can simply place the log4j.xml under src/main/resources directory. It shall be able to read from there.

Upvotes: 2

Related Questions