[Libreoffice] Assertions and Logging
Stephan Bergmann
sbergman at redhat.com
Tue Nov 22 05:01:29 PST 2011
On 11/22/2011 01:15 PM, Bjoern Michaelsen wrote:
>> hmmm... i wonder if it makes sense to not distinguish between warnings
>> and info at compile-time (given that it is only active on debug builds
>> anyway), so it is not required to recompile a module to get full debug
>> output...
>
> Agree. The only valid reason for not having all debug tools compiled in is
> runtime performance and binary size. Once you are debugging those are mostly
> irrelevant.
While there are different switches for compile-time enabling SAL_INFO
and SAL_WARN (the two SAL_LOG_INFO and SAL_LOG_WARN macros that
supersede the single SAL_LOG_LEVEL from my previous design), in practice
they are currently always en-/disabled together. I thought that having
individual switches helps (see "This makes it easier to replace the code
mentioned above..." in a previous mail from me in this thread). But now
that I changed the SAL_INFO/SAL_WARN macros so that their arguments are
always visible to the compiler (see
<http://cgit.freedesktop.org/libreoffice/core/commit/?id=981470b2404a80ed87f237a0e8a62cdef7cea9a5>),
I'm no longer sure this is really useful. Maybe I will fold the two
switches into one after all.
Stephan
More information about the LibreOffice
mailing list