Mercurial > jhg
comparison src/org/tmatesoft/hg/util/RegularFileStats.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 | cd658b24a620 |
children | c02b5710d9ac |
comparison
equal
deleted
inserted
replaced
454:36fd1fd06492 | 456:909306e412e2 |
---|---|
13 * For information on how to redistribute this software under | 13 * For information on how to redistribute this software under |
14 * the terms of a license other than GNU General Public License | 14 * the terms of a license other than GNU General Public License |
15 * contact TMate Software at support@hg4j.com | 15 * contact TMate Software at support@hg4j.com |
16 */ | 16 */ |
17 package org.tmatesoft.hg.util; | 17 package org.tmatesoft.hg.util; |
18 | |
19 import static org.tmatesoft.hg.util.LogFacility.Severity.Warn; | |
18 | 20 |
19 import java.io.File; | 21 import java.io.File; |
20 import java.io.IOException; | 22 import java.io.IOException; |
21 import java.util.ArrayList; | 23 import java.util.ArrayList; |
22 import java.util.Arrays; | 24 import java.util.Arrays; |
138 symlinkValue = links.get(fileName); | 140 symlinkValue = links.get(fileName); |
139 } else { | 141 } else { |
140 symlinkValue = null; | 142 symlinkValue = null; |
141 } | 143 } |
142 } catch (InterruptedException ex) { | 144 } catch (InterruptedException ex) { |
143 sessionContext.getLog().warn(getClass(), ex, String.format("Failed to detect flags for %s", f)); | 145 sessionContext.getLog().dump(getClass(), Warn, ex, String.format("Failed to detect flags for %s", f)); |
144 // try again? ensure not too long? stop right away? | 146 // try again? ensure not too long? stop right away? |
145 // IGNORE, keep isExec and isSymlink false | 147 // IGNORE, keep isExec and isSymlink false |
146 } catch (IOException ex) { | 148 } catch (IOException ex) { |
147 sessionContext.getLog().warn(getClass(), ex, String.format("Failed to detect flags for %s", f)); | 149 sessionContext.getLog().dump(getClass(), Warn, ex, String.format("Failed to detect flags for %s", f)); |
148 // IGNORE, keep isExec and isSymlink false | 150 // IGNORE, keep isExec and isSymlink false |
149 } | 151 } |
150 } | 152 } |
151 } | 153 } |
152 | 154 |