Mercurial > hg4j
diff src/org/tmatesoft/hg/repo/HgBranches.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 | be697c3e951e |
children | b3c16d1aede0 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgBranches.java Wed Jun 13 21:07:39 2012 +0200 +++ b/src/org/tmatesoft/hg/repo/HgBranches.java Mon Jun 18 16:54:00 2012 +0200 @@ -16,6 +16,9 @@ */ package org.tmatesoft.hg.repo; +import static org.tmatesoft.hg.util.LogFacility.Severity.Error; +import static org.tmatesoft.hg.util.LogFacility.Severity.Warn; + import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; @@ -98,24 +101,24 @@ return lastInCache; } catch (IOException ex) { // log error, but otherwise do nothing - repo.getContext().getLog().warn(getClass(), ex, null); + repo.getContext().getLog().dump(getClass(), Warn, ex, null); // FALL THROUGH to return -1 indicating no cache information } catch (NumberFormatException ex) { - repo.getContext().getLog().warn(getClass(), ex, null); + repo.getContext().getLog().dump(getClass(), Warn, ex, null); // FALL THROUGH } catch (HgInvalidControlFileException ex) { // shall not happen, thus log as error - repo.getContext().getLog().error(getClass(), ex, null); + repo.getContext().getLog().dump(getClass(), Error, ex, null); // FALL THROUGH } catch (HgInvalidRevisionException ex) { - repo.getContext().getLog().error(getClass(), ex, null); + repo.getContext().getLog().dump(getClass(), Error, ex, null); // FALL THROUGH } finally { if (br != null) { try { br.close(); } catch (IOException ex) { - repo.getContext().getLog().info(getClass(), ex, null); // ignore + repo.getContext().getLog().dump(getClass(), Warn, ex, null); // ignore } } }