diff src/goodjava/lucene/logging/LogFile.java @ 1465:5e3870618377

lucene.logging dir
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 12 Apr 2020 15:59:57 -0600
parents bfbf9c9c1586
children 7d145095cc0b
line wrap: on
line diff
--- a/src/goodjava/lucene/logging/LogFile.java	Fri Apr 03 10:04:52 2020 -0600
+++ b/src/goodjava/lucene/logging/LogFile.java	Sun Apr 12 15:59:57 2020 -0600
@@ -19,18 +19,18 @@
 import org.apache.lucene.search.BooleanQuery;
 import org.apache.lucene.search.BooleanClause;
 import org.apache.lucene.util.BytesRef;
+import goodjava.logging.Logger;
+import goodjava.logging.LoggerFactory;
 
 
 public class LogFile extends RandomAccessFile {
+	private static final Logger logger = LoggerFactory.getLogger(LogFile.class);
+	public final File file;
 	private long end;
 
 	public LogFile(File file,String mode) throws IOException {
 		super(file,mode);
-		init();
-	}
-
-	public LogFile(String file,String mode) throws IOException {
-		super(file,mode);
+		this.file = file;
 		init();
 	}
 
@@ -45,6 +45,10 @@
 		}
 	}
 
+	public String toString() {
+		return "LogFile<" + file.getName() + ">";
+	}
+
 	public void gotoStart() throws IOException {
 		seek(8L);
 	}