From 6f096ed00cbc7c24bdb968c5e726ae9b4265afb6 Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Wed, 7 Dec 2011 17:29:54 +0300 Subject: [PATCH] Disabled some logs in Release and Production --- map/render_policy.cpp | 2 +- map/render_queue_routine.cpp | 10 +++++----- yg/glyph_cache_impl.cpp | 8 ++++---- yg/internal/opengl.cpp | 2 ++ yg/resource_manager.cpp | 19 +++++++++++++------ 5 files changed, 25 insertions(+), 16 deletions(-) diff --git a/map/render_policy.cpp b/map/render_policy.cpp index 0ac1eae7db..3effeed90f 100644 --- a/map/render_policy.cpp +++ b/map/render_policy.cpp @@ -19,7 +19,7 @@ RenderPolicy::~RenderPolicy() { - LOG(LINFO, ("clearing cached drawing rules")); + LOG(LDEBUG, ("clearing cached drawing rules")); drule::rules().ClearCaches(); } diff --git a/map/render_queue_routine.cpp b/map/render_queue_routine.cpp index 3b2a7f8287..bd5efc75c8 100644 --- a/map/render_queue_routine.cpp +++ b/map/render_queue_routine.cpp @@ -60,11 +60,11 @@ void RenderQueueRoutine::Cancel() if (m_currentRenderCommand != 0) { - LOG(LINFO, ("cancelling current renderCommand in progress")); + LOG(LDEBUG, ("cancelling current renderCommand in progress")); m_currentRenderCommand->m_paintEvent->Cancel(); } - LOG(LINFO, ("waking up the sleeping thread...")); + LOG(LDEBUG, ("waking up the sleeping thread...")); m_hasRenderCommands.Signal(); } @@ -264,7 +264,7 @@ void RenderQueueRoutine::Do() if (IsCancelled()) { - LOG(LINFO, ("thread is cancelled while waiting for a render command")); + LOG(LDEBUG, ("thread is cancelled while waiting for a render command")); break; } @@ -351,7 +351,7 @@ void RenderQueueRoutine::Do() if (IsCancelled()) { - LOG(LINFO, ("cancelled before processing currentRenderCommand")); + LOG(LDEBUG, ("cancelled before processing currentRenderCommand")); } else if (m_currentRenderCommand != 0) { @@ -475,7 +475,7 @@ void RenderQueueRoutine::addWindowHandle(shared_ptr window) void RenderQueueRoutine::Invalidate::perform() { if (isDebugging()) - LOG(LINFO, ("performing Invalidate command")); + LOG(LDEBUG, ("performing Invalidate command")); for_each(m_windowHandles.begin(), m_windowHandles.end(), bind(&WindowHandle::invalidate, _1)); diff --git a/yg/glyph_cache_impl.cpp b/yg/glyph_cache_impl.cpp index bb54a432a7..c04d3da16a 100644 --- a/yg/glyph_cache_impl.cpp +++ b/yg/glyph_cache_impl.cpp @@ -129,7 +129,7 @@ namespace yg if (!fin) break; - LOG(LINFO, ("whitelisting ", fontName, " for ", ubName)); + LOG(LDEBUG, ("whitelisting ", fontName, " for ", ubName)); if (ubName == "*") for (unicode_blocks_t::iterator it = m_unicodeBlocks.begin(); it != m_unicodeBlocks.end(); ++it) @@ -164,7 +164,7 @@ namespace yg if (!fin) break; - LOG(LINFO, ("blacklisting ", fontName, " for ", ubName)); + LOG(LDEBUG, ("blacklisting ", fontName, " for ", ubName)); if (ubName == "*") for (unicode_blocks_t::iterator it = m_unicodeBlocks.begin(); it != m_unicodeBlocks.end(); ++it) @@ -262,7 +262,7 @@ namespace yg ASSERT ( ccIt != charcodes.end(), () ); if ((*ccIt > lastUBEnd) && (*ccIt < ubIt->m_start)) { - LOG(LINFO, ("Symbol with code ", (uint16_t)*ccIt, " present in font lies between two unicode blocks!")); + LOG(LDEBUG, ("Symbol with code ", (uint16_t)*ccIt, " present in font lies between two unicode blocks!")); } if (ubIt->hasSymbol(*ccIt)) break; @@ -370,7 +370,7 @@ namespace yg { if (it->m_fonts.empty()) { - LOG(LINFO, ("querying symbol for empty ", it->m_name, " unicode block")); + LOG(LDEBUG, ("querying symbol for empty ", it->m_name, " unicode block")); it->m_fonts.push_back(m_fonts.front()); } diff --git a/yg/internal/opengl.cpp b/yg/internal/opengl.cpp index 6f23e2f327..e949b66899 100644 --- a/yg/internal/opengl.cpp +++ b/yg/internal/opengl.cpp @@ -34,6 +34,7 @@ namespace yg void DumpGLInformation() { +#ifndef OMIM_PRODUCTION LOG(LINFO, ("OpenGL Information")); LOG(LINFO, ("--------------------------------------------")); LOG(LINFO, ("Vendor : ", glGetString(GL_VENDOR))); @@ -53,6 +54,7 @@ namespace yg } LOG(LINFO, ("--------------------------------------------")); +#endif } bool g_isBufferObjectsSupported = true; diff --git a/yg/resource_manager.cpp b/yg/resource_manager.cpp index 4be59ecec0..7b37434807 100644 --- a/yg/resource_manager.cpp +++ b/yg/resource_manager.cpp @@ -132,9 +132,11 @@ namespace yg if (!m_isFixedBufferCount) m_storagesCount *= k; - LOG(LINFO, ("resizing ", m_poolName)); - LOG(LINFO, (" from : ", oldVBSize / m_vertexSize, " vertices, ", oldIBSize / m_indexSize, " indices, ", oldStoragesCount, " storages, ", oldMemoryUsage, " bytes total")); - LOG(LINFO, (" to : ", m_vbSize / m_vertexSize, " vertices, ", m_ibSize / m_indexSize, " indices, ", m_storagesCount, " storages, ", memoryUsage(), " bytes total")); +#ifndef OMIM_PRODUCTION + LOG(LINFO, ("resizing", m_poolName)); + LOG(LINFO, ("from:", oldVBSize / m_vertexSize, "vertices,", oldIBSize / m_indexSize, "indices,", oldStoragesCount, "storages,", oldMemoryUsage, "bytes total")); + LOG(LINFO, ("to :", m_vbSize / m_vertexSize, "vertices,", m_ibSize / m_indexSize, "indices,", m_storagesCount, "storages,", memoryUsage(), "bytes total")); +#endif } void ResourceManager::StoragePoolParams::distributeFreeMemory(int freeVideoMemory) @@ -146,8 +148,10 @@ namespace yg } else { +#ifndef OMIM_PRODUCTION if (m_vbSize && m_vertexSize && m_ibSize && m_indexSize) LOG(LINFO, (m_poolName, " : ", m_vbSize / m_vertexSize, " vertices, ", m_ibSize / m_indexSize, " indices, ", m_storagesCount, " storages, ", memoryUsage(), " bytes total")); +#endif } } @@ -218,8 +222,10 @@ namespace yg } else { +#ifndef OMIM_PRODUCTION if (m_texWidth && m_texHeight && m_texCount) LOG(LINFO, (m_poolName, " : ", m_texWidth, "x", m_texHeight, ", ", m_texCount, " textures, ", memoryUsage(), " bytes total")); +#endif } } @@ -273,10 +279,11 @@ namespace yg if (!m_isCountFixed) m_texCount *= k; - +#ifndef OMIM_PRODUCTION LOG(LINFO, ("scaling memory usage for ", m_poolName)); LOG(LINFO, (" from : ", oldTexWidth, "x", oldTexHeight, ", ", oldTexCount, " textures, ", oldMemoryUsage, " bytes total")); LOG(LINFO, (" to : ", m_texWidth, "x", m_texHeight, ", ", m_texCount, " textures, ", memoryUsage(), " bytes total")); +#endif } ResourceManager::GlyphCacheParams::GlyphCacheParams() @@ -331,7 +338,7 @@ namespace yg if (videoMemoryLimit < fixedMemoryUsage()) { - LOG(LINFO, ("videoMemoryLimit ", videoMemoryLimit," is less than an amount of fixed resources ", fixedMemoryUsage())); + LOG(LINFO, ("videoMemoryLimit", videoMemoryLimit,"is less than an amount of fixed resources", fixedMemoryUsage())); videoMemoryLimit = memoryUsage(); } @@ -340,7 +347,7 @@ namespace yg /// distributing free memory according to the weights distributeFreeMemory(freeVideoMemory); - LOG(LINFO, ("resizing from ", oldMemoryUsage, " bytes to ", memoryUsage(), " bytes of video memory")); + LOG(LINFO, ("resizing from", oldMemoryUsage, "bytes to", memoryUsage(), "bytes of video memory")); } int ResourceManager::Params::memoryUsage() const