Changeset 12620 in josm for trunk/src/org/openstreetmap/josm/data/cache
- Timestamp:
- 2017-08-22T22:26:32+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/cache
- Files:
-
- 4 edited
-
CacheEntryAttributes.java (modified) (3 diffs)
-
HostLimitQueue.java (modified) (5 diffs)
-
JCSCacheManager.java (modified) (2 diffs)
-
JCSCachedTileLoaderJob.java (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/cache/CacheEntryAttributes.java
r12279 r12620 11 11 12 12 import org.apache.commons.jcs.engine.ElementAttributes; 13 import org.openstreetmap.josm. Main;13 import org.openstreetmap.josm.tools.Logging; 14 14 15 15 /** … … 162 162 for (Entry<String, String> e: map.entrySet()) { 163 163 if (RESERVED_KEYS.contains(e.getKey())) { 164 Main.info("Metadata key configuration contains key {0} which is reserved for internal use");164 Logging.info("Metadata key configuration contains key {0} which is reserved for internal use"); 165 165 } else { 166 166 attrs.put(e.getKey(), e.getValue()); … … 191 191 */ 192 192 public void setError(Exception error) { 193 setErrorMessage( Main.getErrorMessage(error));193 setErrorMessage(Logging.getErrorMessage(error)); 194 194 } 195 195 -
trunk/src/org/openstreetmap/josm/data/cache/HostLimitQueue.java
r11546 r12620 12 12 import java.util.concurrent.TimeUnit; 13 13 14 import org.openstreetmap.josm. Main;14 import org.openstreetmap.josm.tools.Logging; 15 15 16 16 /** … … 67 67 url = job.getUrl(); 68 68 } catch (IOException e) { 69 Main.debug(e);69 Logging.debug(e); 70 70 } 71 Main.debug("TMS - Skipping job {0} because host limit reached", url);71 Logging.debug("TMS - Skipping job {0} because host limit reached", url); 72 72 } 73 73 } … … 90 90 // acquire my got interrupted, first offer back what was taken 91 91 if (!offer(job)) { 92 Main.warn("Unable to offer back " + job);92 Logging.warn("Unable to offer back " + job); 93 93 } 94 94 throw e; … … 110 110 // acquire my got interrupted, first offer back what was taken 111 111 if (!offer(job)) { 112 Main.warn("Unable to offer back " + job);112 Logging.warn("Unable to offer back " + job); 113 113 } 114 114 throw e; … … 209 209 limit.release(); 210 210 if (limit.availablePermits() > hostLimit) { 211 Main.warn("More permits than it should be");211 Logging.warn("More permits than it should be"); 212 212 } 213 213 } -
trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java
r12537 r12620 31 31 import org.openstreetmap.josm.data.preferences.BooleanProperty; 32 32 import org.openstreetmap.josm.data.preferences.IntegerProperty; 33 import org.openstreetmap.josm.tools.Logging; 33 34 import org.openstreetmap.josm.tools.Utils; 34 35 … … 91 92 String msg = formatter.formatMessage(record); 92 93 if (record.getLevel().intValue() >= Level.SEVERE.intValue()) { 93 Main.error(msg);94 Logging.error(msg); 94 95 } else if (record.getLevel().intValue() >= Level.WARNING.intValue()) { 95 Main.warn(msg);96 Logging.warn(msg); 96 97 // downgrade INFO level to debug, as JCS is too verbose at INFO level 97 98 } else if (record.getLevel().intValue() >= Level.INFO.intValue()) { 98 Main.debug(msg);99 Logging.debug(msg); 99 100 } else { 100 Main.trace(msg);101 Logging.trace(msg); 101 102 } 102 103 } -
trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java
r12542 r12620 22 22 import org.apache.commons.jcs.engine.behavior.ICacheElement; 23 23 import org.openstreetmap.gui.jmapviewer.FeatureAdapter; 24 import org.openstreetmap.josm.Main;25 24 import org.openstreetmap.josm.data.cache.ICachedLoaderListener.LoadResult; 26 25 import org.openstreetmap.josm.data.preferences.IntegerProperty; 27 26 import org.openstreetmap.josm.tools.CheckParameterUtil; 28 27 import org.openstreetmap.josm.tools.HttpClient; 28 import org.openstreetmap.josm.tools.Logging; 29 29 import org.openstreetmap.josm.tools.Utils; 30 30 … … 216 216 return getUrl().getHost(); 217 217 } catch (IOException e) { 218 Main.trace(e);218 Logging.trace(e); 219 219 return null; 220 220 } … … 264 264 } catch (IOException e) { 265 265 listeners = null; 266 Main.trace(e);266 Logging.trace(e); 267 267 } 268 268 } … … 406 406 attributes.setError(e); 407 407 LOG.log(Level.WARNING, "JCS - Exception during download {0}", getUrlNoException()); 408 Main.warn(e);408 Logging.warn(e); 409 409 Thread.currentThread().interrupt(); 410 410 } … … 446 446 } catch (NumberFormatException e) { 447 447 // ignore malformed Cache-Control headers 448 Main.trace(e);448 Logging.trace(e); 449 449 } 450 450 }
Note:
See TracChangeset
for help on using the changeset viewer.
