don't log in addDictionary callback, because the logger may not be injected yet
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@900440 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/samples/annotation/src/main/java/org/apache/felix/dm/samples/annotation/SpellChecker.java b/dependencymanager/samples/annotation/src/main/java/org/apache/felix/dm/samples/annotation/SpellChecker.java
index ec2d70e..4b2e4e2 100644
--- a/dependencymanager/samples/annotation/src/main/java/org/apache/felix/dm/samples/annotation/SpellChecker.java
+++ b/dependencymanager/samples/annotation/src/main/java/org/apache/felix/dm/samples/annotation/SpellChecker.java
@@ -19,7 +19,6 @@
package org.apache.felix.dm.samples.annotation;
import java.io.PrintStream;
-import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
import org.apache.felix.dm.annotation.api.Service;
@@ -50,10 +49,8 @@
* @param dictionary the new dictionary
*/
@ServiceDependency(removed = "removeDictionary")
- protected void addDictionary(Map<String, String> serviceProperties, DictionaryService dictionary)
+ protected void addDictionary(DictionaryService dictionary)
{
- m_log.log(LogService.LOG_INFO, "added dictionary: " + dictionary + " (language="
- + serviceProperties.get("language") + ")");
m_dictionaries.add(dictionary);
}
@@ -63,7 +60,6 @@
*/
protected void removeDictionary(DictionaryService dictionary)
{
- m_log.log(LogService.LOG_INFO, "added dictionary: " + dictionary);
m_dictionaries.remove(dictionary);
}
@@ -93,6 +89,10 @@
return;
}
String word = tokens[1];
+
+ m_log.log(LogService.LOG_DEBUG, "Checking spelling of word \"" + word
+ + "\" using the following dictionaries: " + m_dictionaries);
+
for (DictionaryService dictionary : m_dictionaries)
{
if (dictionary.checkWord(tokens[1]))