]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSourceRequest.java
Clean up and support internal seed resources in tg export
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / util / ModelTransferableGraphSourceRequest.java
index b7fe6ed7b29f4cf3c9b45358e13eb9f32544dc31..9832f9d08be6815f2aaa6c24f6e0d64910a54e22 100644 (file)
@@ -81,7 +81,8 @@ public class ModelTransferableGraphSourceRequest extends UniqueRead<ModelTransfe
 
        public static String LOG_FILE = "transferableGraph.log";
        final static boolean LOG = false;
-       final static private boolean DEBUG = false;
+       final static boolean PRINTDEBUG = false;
+       final static boolean DEBUG = LOG | PRINTDEBUG;
        final static boolean PROFILE = false;
        
        private TransferableGraphConfiguration2 configuration;
@@ -103,8 +104,10 @@ public class ModelTransferableGraphSourceRequest extends UniqueRead<ModelTransfe
        }
        
        static void log(String line) {
+               if (PRINTDEBUG) System.err.println(line);
                if (LOG) {
                        try {
+                               if(line.length() > 500) line = line.substring(0, 500);
                                log.writeUTF(line + "\n");
                        } catch (IOException e) {
                                e.printStackTrace();