diff src/org/tmatesoft/hg/internal/KeywordFilter.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 9c9c442b5f2e
children b3c16d1aede0
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/KeywordFilter.java	Wed Jun 13 21:07:39 2012 +0200
+++ b/src/org/tmatesoft/hg/internal/KeywordFilter.java	Mon Jun 18 16:54:00 2012 +0200
@@ -16,6 +16,8 @@
  */
 package org.tmatesoft.hg.internal;
 
+import static org.tmatesoft.hg.util.LogFacility.Severity.Error;
+
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Date;
@@ -263,7 +265,7 @@
 			int csetRev = repo.getFileNode(path).getChangesetRevisionIndex(HgRepository.TIP);
 			return repo.getChangelog().getRevision(csetRev).shortNotation();
 		} catch (HgRuntimeException ex) {
-			HgInternals.getContext(repo).getLog().error(getClass(), ex, null);
+			HgInternals.getContext(repo).getLog().dump(getClass(), Error, ex, null);
 			return Nodeid.NULL.shortNotation(); // XXX perhaps, might return anything better? Not sure how hg approaches this. 
 		}
 	}
@@ -272,7 +274,7 @@
 		try {
 			return getChangeset().user();
 		} catch (HgRuntimeException ex) {
-			HgInternals.getContext(repo).getLog().error(getClass(), ex, null);
+			HgInternals.getContext(repo).getLog().dump(getClass(), Error, ex, null);
 			return "";
 		}
 	}
@@ -282,7 +284,7 @@
 		try {
 			d = getChangeset().date();
 		} catch (HgRuntimeException ex) {
-			HgInternals.getContext(repo).getLog().error(getClass(), ex, null);
+			HgInternals.getContext(repo).getLog().dump(getClass(), Error, ex, null);
 			d = new Date(0l);
 		}
 		return String.format("%tY/%<tm/%<td %<tH:%<tM:%<tS", d);