Bug Hunting Session
Bug 46390 - EasyHack: Move VERBOSE to OSL_DEBUG_LEVEL
Summary: EasyHack: Move VERBOSE to OSL_DEBUG_LEVEL
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Master old -3.6
Hardware: All All
: medium enhancement
Assignee: Rob Snelders
URL:
Whiteboard: target:3.7.0
Keywords: difficultyBeginner, easyHack, skillCpp
Depends on:
Blocks:
 
Reported: 2012-02-21 04:29 UTC by Thomas Arnhold
Modified: 2015-12-15 16:46 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Arnhold 2012-02-21 04:29:00 UTC
Currently there's much usage of VERBOSE, VERBOSE_DEBUG, DEBUG to print verbose debugging messages. These should be coverted to their according OSL_DEBUG_LEVEL.

Example for such a change:

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b13852edb7ab68ba74fb47a38aebbda995323ecf

Possible candidate for such a move:

sd/source/ui/framework/configuration/ConfigurationUpdater.cxx

And many other (search for VERBOSE with OpenGrok).
Comment 1 Stephan Bergmann 2012-02-21 05:35:35 UTC
Or even better yet, replace code like

#if VERBOSE
  fprintf(stderr, ...)
#endif

or

#if OSL_DEBUG_LEVEL > 2
  fprintf(stderr, ...)
#endif

etc. with

  SAL_INFO("your.special.area", ...);

where "your.special.area" is a token that allows to enable logging of just that extra information, with SAL_LOG=+WARN+INFO.your.special.area environment variable (and for the basegfx example might for example be "basegfx.verbose").  See sal/inc/sal/log.hxx and sal/inc/sal/log-areas.dox.
Comment 2 Björn Michaelsen 2012-03-30 04:39:21 UTC
confirming, EasyHackifing
Comment 3 Rob Snelders 2012-03-31 04:32:18 UTC
I'm busy with the sd/-directory
Comment 4 Rob Snelders 2012-04-04 12:19:31 UTC
sd-directory is done
Busy with the other directories
Comment 5 Rob Snelders 2012-04-10 06:58:35 UTC
I have removed them all
Comment 6 Not Assigned 2012-06-09 03:51:28 UTC
Thomas Arnhold committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=cfe98a1305202419f224a31e54cd37e64401fa4f

fdo#46390 Move VERBOSE to OSL_DEBUG_LEVEL leftovers
Comment 7 Robinson Tryon (qubit) 2015-12-15 16:46:36 UTC
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillCpp )
[NinjaEdit]