I want to add some log.debug statements to a class I\'m working on, and I\'d like to see that in output when running the test. I\'d like to override the log4j properties on
As part of your jvm arguments you can set -Dlog4j.configuration=file:". Where FILE_PATH is the path of your log4j.properties file.
Please note that as of log4j2, the new system variable to use is log4j.configurationFile and you put in the actual path to the file (i.e. without the file: prefix) and it will automatically load the factory based on the extension of the configuration file:
-Dlog4j.configurationFile=/path/to/log4jconfig.{ext}