fixed date bug in EntityComment
[mir.git] / source / mir / misc / Logfile.java
index 1775ab4..03550d7 100755 (executable)
@@ -23,11 +23,6 @@ public final class Logfile {
                private RandomAccessFile raf;
                private String fileName;
 
-        //config var, required since it's "null"
-        //TODO: should have a defaul value once I figure out 
-        //how to disperse home dir. -mh
-        private static String logDir="/tmp/";
-
        /**
         * lineSeparator ermitteln und Repository anlegen
         */
@@ -46,7 +41,6 @@ public final class Logfile {
         * @return Logfile
         */
                public static Logfile getInstance(String fileName) {
-            //TODO: tokenize the CallerClass name (fileName)
                        Logfile returnLogfile = null;
                        System.err.println(fileName);
                        if (fileName != null) {
@@ -55,8 +49,6 @@ public final class Logfile {
                                } else {
                                        returnLogfile = new Logfile(fileName);
                                        instanceRepository.put(fileName, returnLogfile);
-                    Integer i = new Integer(instanceRepository.size());
-                    System.err.println("SIZZE: "+i.toString());
                                }
                        } else {
                                System.err.println("Fehler bei Instantiierung von Logfile");
@@ -68,11 +60,10 @@ public final class Logfile {
         * Privater Konstruktor
         * @param   String fileName
         */
-               private Logfile(String file){
-                       this.fileName = logDir+file;
-                       System.err.println("FILENAME "+fileName+"DD");
+               private Logfile(String fileName){
+                       this.fileName = fileName;
                        try {
-                               File f = new File(this.fileName);
+                               File f = new File(fileName);
                                File dir = new File(f.getParent());
                                dir.mkdirs();
                                raf = new RandomAccessFile(fileName, "rw");
@@ -81,13 +72,6 @@ public final class Logfile {
                        }
                }
 
-        //TODO: should have a defaul value once I figure out 
-        //how to disperse home dir. -mh
-        public static void setLogDir(String dir) {
-            logDir=StringUtil.addSeparator(dir);
-                       System.err.println("set logDir "+logDir);
-        }
-
        /**
         * Private Methode, um eine Zeile auszugeben
         *
@@ -184,7 +168,7 @@ public final class Logfile {
                if (raf != null) {
                        try {
                                raf.close();
-                       } catch (IOException e) {}
+                       } catch (IOException e) { ; }
                        raf = null;
                }
                staticFinalize(fileName);