neue forms
[mir.git] / source / mir / media / MediaHandlerImages.java
index 2e3ffb5..3a4365e 100755 (executable)
@@ -34,7 +34,7 @@ public class MediaHandlerImages
     protected final String        WEBDB_GIF="1";
 
     protected String imageType="0";
-    private Logfile theLog = Logfile.getInstance(MirConfig.getProp("Home")+"log/media.log");
+    private Logfile theLog = Logfile.getInstance(this.getClass().getName());
 
        public byte[] get(Entity ent, Entity mediaTypeEnt)
        {
@@ -48,7 +48,7 @@ public class MediaHandlerImages
         } catch ( IllegalAccessException e) {
             theLog.printDebugInfo("method illegal: "+e.toString()); 
         } catch ( InvocationTargetException e) {
-            theLog.printDebugInfo("invocation target illegal: "+e.toString()); 
+            theLog.printDebugInfo("get: invocation target illegal: "+e.toString()); 
         }
 
 
@@ -59,6 +59,9 @@ public class MediaHandlerImages
        {
         try {
             Class[] params = {byte[].class, String.class};
+            theLog.printDebugInfo("NAME: "+ent.getClass().getName()+" "+
+            mediaTypeEnt.getClass().getName()+" "+uploadData.length+" "+
+            imageType); 
             Method method = ent.getClass().getMethod("setImage",params);
             method.invoke(ent, new Object[] {uploadData, imageType});
         } catch ( NoSuchMethodException e) {
@@ -68,7 +71,7 @@ public class MediaHandlerImages
             theLog.printDebugInfo("method illegal: "+e.toString()); 
             return false;
         } catch ( InvocationTargetException e) {
-            theLog.printDebugInfo("invocation target illegal: "+e.toString()); 
+            theLog.printDebugInfo("set: invocation target illegal: "+e.toString()); 
             return false;
         }
         //deref. -mh
@@ -89,7 +92,7 @@ public class MediaHandlerImages
         } catch ( IllegalAccessException e) {
             theLog.printDebugInfo("method illegal: "+e.toString()); 
         } catch ( InvocationTargetException e) {
-            theLog.printDebugInfo("invocation target illegal: "+e.toString()); 
+            theLog.printDebugInfo("getIcon: invocation target illegal: "+e.toString()); 
         }
 
         return icon_data;