Setting logging config file for Eclipse project

8.9k Views Asked by At

To specify my logging configuration file I currently need to set the VM arguments separately for each run configuration in my current Eclipse project:

-Djava.util.logging.config.file=src/main/resources/logging.properties

I know I can also set this globally for the workspace by going to

Window -> Preferences -> Java / Installed JREs,

selecting the appropriate JRE, clicking "Edit..." and adding that line to the "Default VM arguments" field.

But is it possible to set this as the default per project (instead of workspace or run configuration)?

1

There are 1 best solutions below

1
On

In case anyone else stumbles across this as I did, you can specify VM arguments by run configuration by right clicking your project, selecting run as -> run configurations and switching to the arguments tab. Then just put in -Djava.util.logging.config.file=/your/file/path/here