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)?
In Eclipse, click on "Window > Preferences" In the "Preferences" window, select "Collaborator" from left pane. From the right panel after selecting "Collaborator", click on the "Capture Debugging Log" button and close the "Preferences" window.
During development, you can browse and manipulate the platform log file using the Error Log view (Window > Show View > General > Error Log). You can also have the log file mirrored in the Java console by starting Eclipse with the -consoleLog command-line argument.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With