Author: gnodet
Date: Thu Dec 17 08:01:08 2009
New Revision: 891575

URL: http://svn.apache.org/viewvc?rev=891575&view=rev
Log:
FELIX-1862: fileinstall thread name as printed in log messages need to be less 
verbose

Modified:
    
felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java

Modified: 
felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java?rev=891575&r1=891574&r2=891575&view=diff
==============================================================================
--- 
felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
 (original)
+++ 
felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
 Thu Dec 17 08:01:08 2009
@@ -118,7 +118,7 @@
 
     public DirectoryWatcher(Dictionary properties, BundleContext context)
     {
-        super(properties.toString());
+        super("fileinstall-" + getThreadName(properties));
         this.properties = properties;
         this.context = context;
         poll = getLong(properties, POLL, 2000);
@@ -150,6 +150,10 @@
         scanner = new Scanner(watchedDirectory, flt);
     }
 
+    public static String getThreadName(Dictionary properties) {
+        return (properties.get(DIR) != null ? properties.get(DIR) : 
"./load").toString();
+    }
+
     public Dictionary getProperties() {
         return properties;
     }


Reply via email to