Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting logging config file for Eclipse project

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)?

like image 859
Silveri Avatar asked Dec 19 '13 09:12

Silveri


People also ask

How do I enable logging in Eclipse?

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.

Where is logger info in Eclipse?

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.


1 Answers

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

like image 167
mundred Avatar answered Oct 02 '22 14:10

mundred