Consolidating debugging levels (via Easy Hacks)

Stephan Bergmann sbergman at redhat.com
Wed May 27 00:33:33 PDT 2015


On 05/26/2015 11:52 AM, Bjoern Michaelsen wrote:
> we still have multiple othogonal and confusing debug levels in LibreOffice,
> that can interact in funky ways, the most common ones being OSL_DEBUG_LEVEL and
> DBG_UTL.

What are the funky interactions between OSL_DEBUG_LEVEL and DBG_UTIL?

> I'd like to propose to consolidate these into _one_ general debug level with no
> funky interaction. As such, I'd like to work towards the following (ideally via
> Easy Hacks):
> - Disable all current code that is enabled by OSL_DEBUG_LEVEL > 1 by enclosing
>    them in "#if 0" (or alternatively: triggered by an explicit define for the
>    area of code e.g. say DEBUG_SW_LAYOUT)

"#if 0" blocks will very likely get removed as unused code over time. 
That means, for current OSL_DEBUG_LEVEL>N code that is worth keeping 
(and cannot be replaced with plain SAL_INFO calls anyway), it would each 
need some specific #ifdef DEBUG_FOO.  Not sure whether it is better or 
worse to have an add-hoc array of DEBUG_FOO triggers or to have an 
add-hoc array of OSL_DEBUG_LEVEL>N triggers.


More information about the LibreOffice mailing list