From 324512dc42dd742fe6bfaf81e726d11e4a8f8f47 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sun, 19 Jul 2015 11:44:16 +0200 Subject: [PATCH] Avoid logging too much --- OsmAnd-java/src/net/osmand/binary/BinaryMapIndexReader.java | 3 ++- OsmAnd-java/src/net/osmand/map/OsmandRegions.java | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd-java/src/net/osmand/binary/BinaryMapIndexReader.java b/OsmAnd-java/src/net/osmand/binary/BinaryMapIndexReader.java index 7b6067f691..01d05c36a4 100644 --- a/OsmAnd-java/src/net/osmand/binary/BinaryMapIndexReader.java +++ b/OsmAnd-java/src/net/osmand/binary/BinaryMapIndexReader.java @@ -855,7 +855,7 @@ public class BinaryMapIndexReader { } } - if(req.numberOfVisitedObjects > 0) { + if(req.numberOfVisitedObjects > 0 && req.log) { log.info("Search is done. Visit " + req.numberOfVisitedObjects + " objects. Read " + req.numberOfAcceptedObjects + " objects."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ log.info("Read " + req.numberOfReadSubtrees + " subtrees. Go through " + req.numberOfAcceptedSubtrees + " subtrees."); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ } @@ -1637,6 +1637,7 @@ public class BinaryMapIndexReader { int numberOfReadSubtrees = 0; int numberOfAcceptedSubtrees = 0; boolean interrupted = false; + boolean log = true; protected SearchRequest(){ } diff --git a/OsmAnd-java/src/net/osmand/map/OsmandRegions.java b/OsmAnd-java/src/net/osmand/map/OsmandRegions.java index b4861f012a..a058003aaa 100644 --- a/OsmAnd-java/src/net/osmand/map/OsmandRegions.java +++ b/OsmAnd-java/src/net/osmand/map/OsmandRegions.java @@ -250,6 +250,7 @@ public class OsmandRegions { } } ); + sr.log = false; if(reader != null) { reader.searchMapIndex(sr); }