Vitali Melamud
Vitali Melamud

Reputation: 1397

Override log4j.properties from within the log4j.properties

Is it possible to state something like - "override file = /log4j.properties"

From within the log4j.properties and to link to the actual log4j config?

Thanks!

Upvotes: 0

Views: 82

Answers (1)

Paul Vargas
Paul Vargas

Reputation: 42020

It is not possible. However, you can configure the system property log4j.configuration specifying the path of a configuration file. Add the following parameter when you create the JVM:

java -Dlog4j.configuration=path/to/log4j-test.properties AwesomeApp

Upvotes: 1

Related Questions