[core] Demote "Unable to make space for entry" message from Warning to Debug (#4708)

This commit is contained in:
John Firebaugh
2016-04-14 13:43:24 -07:00
parent a47ab85283
commit 18d8e80f52
2 changed files with 3 additions and 7 deletions

View File

@@ -158,7 +158,7 @@ std::pair<bool, uint64_t> OfflineDatabase::putInternal(const Resource& resource,
}
if (evict_ && !evict(size)) {
Log::Warning(Event::Database, "Unable to make space for entry");
Log::Debug(Event::Database, "Unable to make space for entry");
return { false, 0 };
}

View File

@@ -586,17 +586,13 @@ TEST(OfflineDatabase, PutRegionResourceDoesNotEvict) {
TEST(OfflineDatabase, PutFailsWhenEvictionInsuffices) {
using namespace mbgl;
Log::setObserver(std::make_unique<FixtureLogObserver>());
OfflineDatabase db(":memory:", 1024 * 100);
Response big;
big.data = randomString(1024 * 100);
db.put(Resource::style("http://example.com/big"), big);
EXPECT_FALSE(bool(db.get(Resource::style("http://example.com/big"))));
auto observer = Log::removeObserver();
auto flo = dynamic_cast<FixtureLogObserver*>(observer.get());
EXPECT_EQ(1ul, flo->count({ EventSeverity::Warning, Event::Database, -1, "Unable to make space for entry" }));
EXPECT_FALSE(db.put(Resource::style("http://example.com/big"), big).first);
EXPECT_FALSE(bool(db.get(Resource::style("http://example.com/big"))));
}
TEST(OfflineDatabase, OfflineMapboxTileCount) {