Commit 975108b0 authored by guus's avatar guus

Updating 'search' plugin to make use of SLF4J instead of custom logging (OF-53).


git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@11446 b35dd754-fafc-0310-a699-88a17e54d16e
parent c278b63c
...@@ -44,6 +44,12 @@ ...@@ -44,6 +44,12 @@
Search Plugin Changelog Search Plugin Changelog
</h1> </h1>
<p><b>1.5.0</b> -- December 2, 2009</p>
<ul>
<li>Now requires Openfire 3.6.5.</li>
<li>[<a href='http://www.igniterealtime.org/issues/browse/OF-53'>OF-53</a>] - Replace custom logging implementation with a third party library.</li>
</ul>
<p><b>1.4.4</b> -- Jun 24, 2009</p> <p><b>1.4.4</b> -- Jun 24, 2009</p>
<ul> <ul>
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
<name>Search</name> <name>Search</name>
<description>Provides support for Jabber Search (XEP-0055)</description> <description>Provides support for Jabber Search (XEP-0055)</description>
<author>Ryan Graham</author> <author>Ryan Graham</author>
<version>1.4.4</version> <version>1.5.0</version>
<date>6/24/2009</date> <date>12/2/2009</date>
<minServerVersion>3.5.0</minServerVersion> <minServerVersion>3.6.5</minServerVersion>
<adminconsole> <adminconsole>
<tab id="tab-server"> <tab id="tab-server">
......
...@@ -43,10 +43,11 @@ import org.jivesoftware.openfire.user.User; ...@@ -43,10 +43,11 @@ import org.jivesoftware.openfire.user.User;
import org.jivesoftware.openfire.user.UserManager; import org.jivesoftware.openfire.user.UserManager;
import org.jivesoftware.util.JiveGlobals; import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.LocaleUtils; import org.jivesoftware.util.LocaleUtils;
import org.jivesoftware.util.Log;
import org.jivesoftware.util.PropertyEventDispatcher; import org.jivesoftware.util.PropertyEventDispatcher;
import org.jivesoftware.util.PropertyEventListener; import org.jivesoftware.util.PropertyEventListener;
import org.jivesoftware.util.StringUtils; import org.jivesoftware.util.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xmpp.component.Component; import org.xmpp.component.Component;
import org.xmpp.component.ComponentException; import org.xmpp.component.ComponentException;
import org.xmpp.component.ComponentManager; import org.xmpp.component.ComponentManager;
...@@ -76,6 +77,9 @@ import org.xmpp.resultsetmanagement.ResultSetImpl; ...@@ -76,6 +77,9 @@ import org.xmpp.resultsetmanagement.ResultSetImpl;
* @author <a href="mailto:ryan@version2software.com">Ryan Graham</a> * @author <a href="mailto:ryan@version2software.com">Ryan Graham</a>
*/ */
public class SearchPlugin implements Component, Plugin, PropertyEventListener { public class SearchPlugin implements Component, Plugin, PropertyEventListener {
private static final Logger Log = LoggerFactory.getLogger(SearchPlugin.class);
public static final String NAMESPACE_JABBER_IQ_SEARCH = "jabber:iq:search"; public static final String NAMESPACE_JABBER_IQ_SEARCH = "jabber:iq:search";
public static final String SERVICENAME = "plugin.search.serviceName"; public static final String SERVICENAME = "plugin.search.serviceName";
public static final String SERVICEENABLED = "plugin.search.serviceEnabled"; public static final String SERVICEENABLED = "plugin.search.serviceEnabled";
...@@ -160,7 +164,7 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener { ...@@ -160,7 +164,7 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener {
componentManager.addComponent(serviceName, this); componentManager.addComponent(serviceName, this);
} }
catch (ComponentException e) { catch (ComponentException e) {
Log.error(e); Log.error(e.getMessage(), e);
} }
PropertyEventDispatcher.addListener(this); PropertyEventDispatcher.addListener(this);
} }
...@@ -196,7 +200,7 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener { ...@@ -196,7 +200,7 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener {
} }
catch (Exception e) { catch (Exception e) {
if (componentManager != null) { if (componentManager != null) {
Log.error(e); Log.error(e.getMessage(), e);
} }
} }
serviceName = null; serviceName = null;
...@@ -238,7 +242,7 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener { ...@@ -238,7 +242,7 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener {
try { try {
componentManager.sendPacket(this, replyPacket); componentManager.sendPacket(this, replyPacket);
} catch (ComponentException e) { } catch (ComponentException e) {
Log.error(e); Log.error(e.getMessage(), e);
} }
} }
...@@ -947,14 +951,14 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener { ...@@ -947,14 +951,14 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener {
componentManager.removeComponent(this.serviceName); componentManager.removeComponent(this.serviceName);
} }
catch (Exception e) { catch (Exception e) {
Log.error(e); Log.error(e.getMessage(), e);
} }
try { try {
componentManager.addComponent(serviceName, this); componentManager.addComponent(serviceName, this);
} }
catch (Exception e) { catch (Exception e) {
Log.error(e); Log.error(e.getMessage(), e);
} }
this.serviceName = serviceName; this.serviceName = serviceName;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment