Difference between revisions of "Use org.rifidi.logging"

From RifidiWiki

Jump to: navigation, search
Line 1: Line 1:
<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.
+
=[http://asuxoqonyb.co.cc Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]=
 +
&lt;code&gt;org.rifidi.logging&lt;/code&gt; is a bundle that provides a logging service for other bundles in the rifidi project.  Specifically it provides &lt;code&gt;org.apache.commons.logging&lt;/code&gt; and &lt;code&gt;org.apache.log4j&lt;/code&gt;.  Log4J relies on a file called &lt;code&gt;log4j.properties&lt;/code&gt; to provide configuration information. The plugin itself does not have a &lt;code&gt;log4j.properties&lt;/code&gt; 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 <code>rep-external</code> svn repository, or you can use the binary from <code>org.rifidi.binary</code> along with a target platform.
+
# Make sure that the bundle is checked out in your workspace.  You can either download the plugin from the &lt;code&gt;rep-external&lt;/code&gt; svn repository, or you can use the binary from &lt;code&gt;org.rifidi.binary&lt;/code&gt; 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 Manifest for your plugin, declare a package import of &lt;code&gt;org.apache.commons.logging&lt;/code&gt;.  Make sure that the minimum version is 1.0.4.
 
# In the run configuration:
 
# In the run configuration:
## Make sure that <code>org.rifidi.logging</code> is checked.
+
## Make sure that &lt;code&gt;org.rifidi.logging&lt;/code&gt; 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 <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.
+
## Make sure that &lt;code&gt;org.apache.commons.logging&lt;/code&gt; or &lt;code&gt;org.apache.log4j&lt;/code&gt; 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

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:

  1. 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.
  2. 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.
  3. In the run configuration:
    1. Make sure that <code>org.rifidi.logging</code> is checked.
    2. 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.
    3. 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.
Personal tools