diff src/org/tmatesoft/hg/repo/HgDataFile.java @ 456:909306e412e2

Refactor LogFacility and SessionContext, better API for both
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Mon, 18 Jun 2012 16:54:00 +0200
parents 32184ddcf46d
children b3c16d1aede0
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgDataFile.java	Wed Jun 13 21:07:39 2012 +0200
+++ b/src/org/tmatesoft/hg/repo/HgDataFile.java	Mon Jun 18 16:54:00 2012 +0200
@@ -18,6 +18,7 @@
 
 import static org.tmatesoft.hg.repo.HgInternals.wrongRevisionIndex;
 import static org.tmatesoft.hg.repo.HgRepository.*;
+import static org.tmatesoft.hg.util.LogFacility.Severity.*;
 
 import java.io.ByteArrayOutputStream;
 import java.io.File;
@@ -181,7 +182,7 @@
 					try {
 						fc.close();
 					} catch (IOException ex) {
-						getRepo().getContext().getLog().info(getClass(), ex, null);
+						getRepo().getContext().getLog().dump(getClass(), Warn, ex, null);
 					}
 				}
 			}
@@ -207,7 +208,7 @@
 		final int csetRevIndex;
 		if (p.isNull()) {
 			// no dirstate parents 
-			getRepo().getContext().getLog().info(getClass(), "No dirstate parents, resort to TIP", getPath());
+			getRepo().getContext().getLog().dump(getClass(), Info, "No dirstate parents, resort to TIP", getPath());
 			// if it's a repository with no dirstate, use TIP then
 			csetRevIndex = clog.getLastRevision();
 			if (csetRevIndex == -1) {
@@ -607,7 +608,7 @@
 						break;
 					}
 					if (key == null || lastColon == -1 || i <= lastColon) {
-						log.error(getClass(), "Missing key in file revision metadata at index %d", i);
+						log.dump(getClass(), Error, "Missing key in file revision metadata at index %d", i);
 					}
 					value = new String(bos.toByteArray()).trim();
 					bos.reset();