Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Efxclipse/Runtime/Recipes"
(→Usage) |
(→Logging) |
||
Line 9: | Line 9: | ||
* <code>java.util.Logging</code> (default) | * <code>java.util.Logging</code> (default) | ||
− | * log4j by adding <code>org.eclipse.fx.core.log4j</code> | + | * log4j by adding <code>org.eclipse.fx.core.log4j</code> bundle to your OSGi-Runtime |
=== Usage === | === Usage === |
Revision as of 17:08, 6 December 2013
This page holds best practice recipes when writing JavaFX application using e(fx)clipse
Core
Logging
e(fx)clipse has its own logging facade org.eclipse.fx.core.log.Logger
which allows to plug-in different log frameworks.
Currently available are:
-
java.util.Logging
(default) - log4j by adding
org.eclipse.fx.core.log4j
bundle to your OSGi-Runtime
Usage
There are different ways to use get a logger.
LoggerCreator
If you are running on OSGi you can add the org.eclipse.fx.osgi.util
bundle which provides access to the LoggerCreator
factory class
private org.eclipse.fx.core.log.Logger; private org.eclipse.fx.osgi.util.LoggerCreator; public class MyClass { private static Logger LOGGER = LoggerCreator.createLogger(MyClass.class); // .... }