java - Configure log4j log level using an external configuration file -


Is it possible to configure log4j log level by using the external configuration file? Instead of configuring a user log level in the Log4j.properties file, I would like to configure the log level by using a project configuration file.

WulfgarPro

It depends on your build / make tool for example : I do the same in Maven. Maven has the "filtering" feature that you can enable Maven filtering will replace $ {some_property} in all your resource files, which is the value of "some_property" in Maven.

In this way I change my Log4J properties if I am in dev or prod mode. Besides, I do not know that log4J has such a feature. I'm sure that is possible through ant.

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -