Difference between revisions of "Use org.rifidi.logging"
From RifidiWiki
Line 1: | Line 1: | ||
− | + | =[http://asuxoqonyb.co.cc Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]= | |
+ | <code>org.rifidi.logging</code> is a bundle that provides a logging service for other bundles in the rifidi project. Specifically it provides <code>org.apache.commons.logging</code> and <code>org.apache.log4j</code>. Log4J relies on a file called <code>log4j.properties</code> to provide configuration information. The plugin itself does not have a <code>log4j.properties</code> folder in it. Instead, it relies on a OSGi bundle fragment to add one to the classpath. | ||
To use it in another plugin: | To use it in another plugin: | ||
− | # Make sure that the bundle is checked out in your workspace. You can either download the plugin from the | + | # Make sure that the bundle is checked out in your workspace. You can either download the plugin from the <code>rep-external</code> svn repository, or you can use the binary from <code>org.rifidi.binary</code> along with a target platform. |
− | # In the Manifest for your plugin, declare a package import of | + | # In the Manifest for your plugin, declare a package import of <code>org.apache.commons.logging</code>. Make sure that the minimum version is 1.0.4. |
# In the run configuration: | # In the run configuration: | ||
− | ## Make sure that | + | ## Make sure that <code>org.rifidi.logging</code> is checked. |
## Make sure that only one log4J fragment is checked. If more than one is loaded, it is not defined which one will be used to configure log4j. | ## Make sure that only one log4J fragment is checked. If more than one is loaded, it is not defined which one will be used to configure log4j. | ||
− | ## Make sure that | + | ## Make sure that <code>org.apache.commons.logging</code> or <code>org.apache.log4j</code> is not being provided by a target platform. It is recommended that target platforms used by rifidi not contain either of these two bundles. |
Revision as of 23:24, 23 November 2010
<code>org.rifidi.logging</code> is a bundle that provides a logging service for other bundles in the rifidi project. Specifically it provides <code>org.apache.commons.logging</code> and <code>org.apache.log4j</code>. Log4J relies on a file called <code>log4j.properties</code> to provide configuration information. The plugin itself does not have a <code>log4j.properties</code> folder in it. Instead, it relies on a OSGi bundle fragment to add one to the classpath.
To use it in another plugin:
- Make sure that the bundle is checked out in your workspace. You can either download the plugin from the <code>rep-external</code> svn repository, or you can use the binary from <code>org.rifidi.binary</code> along with a target platform.
- In the Manifest for your plugin, declare a package import of <code>org.apache.commons.logging</code>. Make sure that the minimum version is 1.0.4.
- In the run configuration:
- Make sure that <code>org.rifidi.logging</code> is checked.
- Make sure that only one log4J fragment is checked. If more than one is loaded, it is not defined which one will be used to configure log4j.
- Make sure that <code>org.apache.commons.logging</code> or <code>org.apache.log4j</code> is not being provided by a target platform. It is recommended that target platforms used by rifidi not contain either of these two bundles.