diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2015-08-10 14:01:33 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2015-08-11 03:31:47 +0000 |
commit | 7bdc6be9c23517eec02ce7139edd7003abbee1f8 (patch) | |
tree | f1db60222b9cd8c21e8039b4023e74ffb1994227 /slideshow | |
parent | e98cf0c63d6c48ca7c1db87d7413d5c419690c76 (diff) |
slideshow: stop (mis)-using VERBOSE
converted the use of internal 'verbose' level tracing to SAL_INFO/SAL_WARN
Change-Id: Iab89d9b5c75fe476c6516718f1cee3d01d196858
Reviewed-on: https://gerrit.libreoffice.org/17632
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'slideshow')
-rw-r--r-- | slideshow/CppunitTest_slideshow.mk | 1 | ||||
-rw-r--r-- | slideshow/Executable_demoshow.mk | 10 | ||||
-rw-r--r-- | slideshow/Library_OGLTrans.mk | 6 | ||||
-rw-r--r-- | slideshow/Library_slideshow.mk | 1 | ||||
-rw-r--r-- | slideshow/qa/debug/readme.txt | 3 | ||||
-rw-r--r-- | slideshow/source/engine/activities/simplecontinuousactivitybase.cxx | 15 | ||||
-rw-r--r-- | slideshow/source/engine/activitiesqueue.cxx | 4 | ||||
-rw-r--r-- | slideshow/source/engine/animationnodes/animationbasenode.cxx | 4 | ||||
-rw-r--r-- | slideshow/source/engine/animationnodes/basecontainernode.cxx | 9 | ||||
-rw-r--r-- | slideshow/source/engine/animationnodes/basenode.cxx | 33 | ||||
-rw-r--r-- | slideshow/source/engine/eventqueue.cxx | 2 | ||||
-rw-r--r-- | slideshow/source/engine/shapes/drawshapesubsetting.cxx | 12 | ||||
-rw-r--r-- | slideshow/source/engine/shapes/viewshape.cxx | 13 | ||||
-rw-r--r-- | slideshow/source/engine/smilfunctionparser.cxx | 4 |
14 files changed, 49 insertions, 68 deletions
diff --git a/slideshow/CppunitTest_slideshow.mk b/slideshow/CppunitTest_slideshow.mk index 2207a8321fb0..c95793003f6c 100644 --- a/slideshow/CppunitTest_slideshow.mk +++ b/slideshow/CppunitTest_slideshow.mk @@ -18,7 +18,6 @@ $(eval $(call gb_CppunitTest_set_include,slideshow,\ $(eval $(call gb_CppunitTest_set_defs,slideshow,\ $$(DEFS) \ - $(if $(filter TRUE,$(VERBOSE)),-DVERBOSE) \ )) ifneq ($(strip $(debug)$(DEBUG)),) diff --git a/slideshow/Executable_demoshow.mk b/slideshow/Executable_demoshow.mk index 56725bd6c7fc..d46e47f759c8 100644 --- a/slideshow/Executable_demoshow.mk +++ b/slideshow/Executable_demoshow.mk @@ -16,16 +16,8 @@ $(eval $(call gb_Executable_set_include,demoshow,\ -I$(SRCDIR)/slideshow/source/inc \ )) -ifeq ($(strip $(VERBOSE)),TRUE) -$(eval $(call gb_Executable_set_defs,demoshow,\ - $$(DEFS) \ - -DVERBOSE \ -)) -endif - ifneq ($(strip $(debug)$(DEBUG)),) -$(eval $(call gb_Executable_set_defs,demoshow,\ - $$(DEFS) \ +$(eval $(call gb_Executable_add_defs,demoshow,\ -DBOOST_SP_ENABLE_DEBUG_HOOKS \ )) endif diff --git a/slideshow/Library_OGLTrans.mk b/slideshow/Library_OGLTrans.mk index f5f4676677e6..4c3340f34e7d 100644 --- a/slideshow/Library_OGLTrans.mk +++ b/slideshow/Library_OGLTrans.mk @@ -9,12 +9,6 @@ $(eval $(call gb_Library_Library,OGLTrans)) -ifeq ($(strip $(VERBOSE)),TRUE) -$(eval $(call gb_Library_add_defs,OGLTrans,\ - -DVERBOSE \ -)) -endif - ifneq ($(strip $(debug)$(DEBUG)),) $(eval $(call gb_Library_add_defs,OGLTrans,\ -DBOOST_SP_ENABLE_DEBUG_HOOKS \ diff --git a/slideshow/Library_slideshow.mk b/slideshow/Library_slideshow.mk index 5d01391ce55b..5772afd1d37d 100644 --- a/slideshow/Library_slideshow.mk +++ b/slideshow/Library_slideshow.mk @@ -16,7 +16,6 @@ $(eval $(call gb_Library_set_include,slideshow,\ $(eval $(call gb_Library_add_defs,slideshow,\ -DBOOST_SPIRIT_USE_OLD_NAMESPACE \ - $(if $(filter TRUE,$(VERBOSE)),-DVERBOSE) \ )) ifneq ($(strip $(debug)$(DEBUG)),) diff --git a/slideshow/qa/debug/readme.txt b/slideshow/qa/debug/readme.txt index a3df5a93b768..eb458d686025 100644 --- a/slideshow/qa/debug/readme.txt +++ b/slideshow/qa/debug/readme.txt @@ -1,7 +1,6 @@ Recognized preprocessor switches ================================ - - VERBOSE=t: enable extra verbose trace output (debug=t builds only) - TIMELOG=t: enable time logging (also for product builds) @@ -17,4 +16,4 @@ nodetree.sh: script. To generate output at other instances, use the DEBUG_NODES_SHOWTREE macro in animationnodefactory.cxx. -
\ No newline at end of file + diff --git a/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx b/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx index 347483a19712..f227e89eeb44 100644 --- a/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx +++ b/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx @@ -56,8 +56,8 @@ namespace slideshow const double nCurrElapsedTime( maTimer.getElapsedTime() ); // log time - VERBOSE_TRACE( "SimpleContinuousActivityBase::calcTimeLag(): " - "next step is based on time: %f", nCurrElapsedTime ); + SAL_INFO("slideshow.verbose", "SimpleContinuousActivityBase::calcTimeLag(): " + "next step is based on time: " << nCurrElapsedTime ); // go to great length to ensure a proper animation // run. Since we don't know how often we will be called @@ -90,15 +90,16 @@ namespace slideshow // time line. if( nFractionElapsedTime < nFractionRequiredCalls ) { - VERBOSE_TRACE( "SimpleContinuousActivityBase::calcTimeLag(): " - "t=%f is based on time", nFractionElapsedTime ); + SAL_INFO("slidewho.verbose", "SimpleContinuousActivityBase::calcTimeLag(): t=" << + nFractionElapsedTime << + " is based on time"); return 0.0; } else { - VERBOSE_TRACE( "SimpleContinuousActivityBase::perform(): " - "t=%f is based on number of calls", - nFractionRequiredCalls ); + SAL_INFO("slideshow.verbose", "SimpleContinuousActivityBase::perform(): t=" << + nFractionRequiredCalls << + " is based on number of calls"); // lag global time, so all other animations lag, too: return ((nFractionElapsedTime - nFractionRequiredCalls) diff --git a/slideshow/source/engine/activitiesqueue.cxx b/slideshow/source/engine/activitiesqueue.cxx index 3cca2ef46929..57459b4cdced 100644 --- a/slideshow/source/engine/activitiesqueue.cxx +++ b/slideshow/source/engine/activitiesqueue.cxx @@ -86,7 +86,7 @@ namespace slideshow void ActivitiesQueue::process() { - VERBOSE_TRACE( "ActivitiesQueue: outer loop heartbeat" ); + SAL_INFO("slideshow.verbose", "ActivitiesQueue: outer loop heartbeat" ); // accumulate time lag for all activities, and lag time // base if necessary: @@ -156,7 +156,7 @@ namespace slideshow else maDequeuedActivities.push_back( pActivity ); - VERBOSE_TRACE( "ActivitiesQueue: inner loop heartbeat" ); + SAL_INFO("slideshow.verbose", "ActivitiesQueue: inner loop heartbeat" ); } if( !maCurrentActivitiesReinsert.empty() ) diff --git a/slideshow/source/engine/animationnodes/animationbasenode.cxx b/slideshow/source/engine/animationnodes/animationbasenode.cxx index 41adb19b6435..c70ffc3664df 100644 --- a/slideshow/source/engine/animationnodes/animationbasenode.cxx +++ b/slideshow/source/engine/animationnodes/animationbasenode.cxx @@ -368,12 +368,12 @@ bool AnimationBaseNode::hasPendingAnimation() const return true; } -#if OSL_DEBUG_LEVEL >= 2 && defined(DBG_UTIL) +#if defined(DBG_UTIL) void AnimationBaseNode::showState() const { BaseNode::showState(); - VERBOSE_TRACE( "AnimationBaseNode info: independent subset=%s", + SAL_INFO( "slideshow.verbose", "AnimationBaseNode info: independent subset=" << mbIsIndependentSubset ? "y" : "n" ); } #endif diff --git a/slideshow/source/engine/animationnodes/basecontainernode.cxx b/slideshow/source/engine/animationnodes/basecontainernode.cxx index 5371c1217462..930e4be0a871 100644 --- a/slideshow/source/engine/animationnodes/basecontainernode.cxx +++ b/slideshow/source/engine/animationnodes/basecontainernode.cxx @@ -183,10 +183,11 @@ void BaseContainerNode::showState() const { BaseNodeSharedPtr pNode = boost::dynamic_pointer_cast<BaseNode>(maChildren[i]); - VERBOSE_TRACE( - "Node connection: n%p -> n%p", - (const char*)this+debugGetCurrentOffset(), - (const char*)pNode.get()+debugGetCurrentOffset() ); + SAL_INFO("slideshow.verbose", + "Node connection: n" << + (const void*)this+debugGetCurrentOffset() << + " -> n" << + (const void*)pNode.get()+debugGetCurrentOffset() ); pNode->showState(); } diff --git a/slideshow/source/engine/animationnodes/basenode.cxx b/slideshow/source/engine/animationnodes/basenode.cxx index 4c06a809f844..f7947b0cb80d 100644 --- a/slideshow/source/engine/animationnodes/basenode.cxx +++ b/slideshow/source/engine/animationnodes/basenode.cxx @@ -686,16 +686,19 @@ void BaseNode::showState() const const AnimationNode::NodeState eNodeState( getState() ); if( eNodeState == AnimationNode::INVALID ) - VERBOSE_TRACE( "Node state: n%p [label=\"%s\",style=filled," - "fillcolor=\"0.5,0.2,0.5\"]", - (const char*)this+debugGetCurrentOffset(), - getDescription() ); + SAL_INFO("slideshow.verbose", "Node state: n" << + (const char*)this+debugGetCurrentOffset() << + " [label=\"" << + getDescription() << + "\",style=filled, fillcolor=\"0.5,0.2,0.5\"]"); else - VERBOSE_TRACE( "Node state: n%p [label=\"%s\",style=filled," - "fillcolor=\"%f,1.0,1.0\"]", - (const char*)this+debugGetCurrentOffset(), - getDescription(), - log(double(getState()))/4.0 ); + SAL_INFO("slideshow.verbose", "Node state: n" << + (const char*)this+debugGetCurrentOffset() << + " [label=\"" << + getDescription() << + "fillcolor=\"" << + log(double(getState()))/4.0 << + ",1.0,1.0\"]"); // determine additional node information uno::Reference<animations::XAnimate> const xAnimate( mxAnimationNode, @@ -725,13 +728,11 @@ void BaseNode::showState() const OUString("Name") ) >>= aName) ) { - const OString& rAsciiName( - OUStringToOString( aName, - RTL_TEXTENCODING_ASCII_US ) ); - - VERBOSE_TRACE( "Node info: n%p, name \"%s\"", - (const char*)this+debugGetCurrentOffset(), - rAsciiName.getStr() ); + SAL_INFO("slideshow.verbose" "Node info: n" << + (const char*)this+debugGetCurrentOffset(), + ", name \"" << + aName << + "\""); } } } diff --git a/slideshow/source/engine/eventqueue.cxx b/slideshow/source/engine/eventqueue.cxx index 6e5d2b49a9ea..c7fc66ebec8c 100644 --- a/slideshow/source/engine/eventqueue.cxx +++ b/slideshow/source/engine/eventqueue.cxx @@ -169,7 +169,7 @@ namespace slideshow void EventQueue::process_( bool bFireAllEvents ) { - VERBOSE_TRACE( "EventQueue: heartbeat" ); + SAL_INFO("slideshow.verbose", "EventQueue: heartbeat" ); // add in all that have been added explicitly for this round: EventEntryVector::const_iterator const iEnd( maNextEvents.end() ); diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.cxx b/slideshow/source/engine/shapes/drawshapesubsetting.cxx index ad3f7ea37537..cd273f71fb4c 100644 --- a/slideshow/source/engine/shapes/drawshapesubsetting.cxx +++ b/slideshow/source/engine/shapes/drawshapesubsetting.cxx @@ -156,15 +156,9 @@ namespace slideshow case MetaActionType::TEXTARRAY: case MetaActionType::STRETCHTEXT: nLastTextActionIndex = nActionIndex; -#if OSL_DEBUG_LEVEL > 1 - { - MetaTextAction* pText = static_cast<MetaTextAction*>(pCurrAct); - VERBOSE_TRACE( "Shape text \"%s\" at action #%d", - OUStringToOString(pText->GetText(), - RTL_TEXTENCODING_ISO_8859_1).getStr(), - nActionIndex ); - } -#endif + SAL_INFO("slideshow.verbose", "Shape text \"" << + (static_cast<MetaTextAction*>(pCurrAct))->GetText() << + "\" at action #" << nActionIndex ); // fallthrough intended default: // comment action and all actions not diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx index 2653c9753270..7bf9368e2ac9 100644 --- a/slideshow/source/engine/shapes/viewshape.cxx +++ b/slideshow/source/engine/shapes/viewshape.cxx @@ -381,7 +381,7 @@ namespace slideshow ENSURE_OR_RETURN_FALSE( mpSprite, "ViewShape::renderSprite(): No sprite" ); - VERBOSE_TRACE( "ViewShape::renderSprite(): Rendering sprite 0x%p", + SAL_INFO("slideshow", "ViewShape::renderSprite(): Rendering sprite " << mpSprite.get() ); @@ -524,7 +524,7 @@ namespace slideshow if( !bIsVisible ) { - VERBOSE_TRACE( "ViewShape::render(): skipping shape %p", this ); + SAL_INFO("slideshow", "ViewShape::render(): skipping shape " << this ); // shape is invisible, no need to update anything. return true; @@ -549,10 +549,11 @@ namespace slideshow if( !bRedrawRequired ) return true; - VERBOSE_TRACE( "ViewShape::render(): rendering shape %p at position (%f,%f)", - this, - rBounds.getMinX(), - rBounds.getMinY() ); + SAL_INFO( "slideshow", "ViewShape::render(): rendering shape " << + this << + " at position (" << + rBounds.getMinX() << "," << + rBounds.getMinY() << ")" ); // shape needs repaint - setup all that's needed diff --git a/slideshow/source/engine/smilfunctionparser.cxx b/slideshow/source/engine/smilfunctionparser.cxx index 7e184030cf9d..64021265589f 100644 --- a/slideshow/source/engine/smilfunctionparser.cxx +++ b/slideshow/source/engine/smilfunctionparser.cxx @@ -38,7 +38,7 @@ // But watch out, the parser might have // state not visible to this code! #define BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE -#if defined(VERBOSE) && defined(DBG_UTIL) +#if defined(DBG_UTIL) #include <typeinfo> #define BOOST_SPIRIT_DEBUG #endif @@ -180,7 +180,7 @@ namespace slideshow { if( !mpContext->mbParseAnimationFunction ) { - OSL_FAIL( "ValueTFunctor::operator(): variable encountered, but we're not parsing a function here" ); + SAL_WARN("slideshow", "ValueTFunctor::operator(): variable encountered, but we're not parsing a function here" ); throw ParseError(); } |