On 11/22/2011 10:50 AM, Stephan Bergmann wrote:
I pushed the proposed changes as
<http://cgit.freedesktop.org/libreoffice/core/commit/?id=70a6b9ffbd676a1384433a86205d2cd4f2d4f4b1>
and
<http://cgit.freedesktop.org/libreoffice/binfilter/commit/?id=d45d5ee81e3d3f1779774af3f400ce3f1aa6697d>.
Any further refinements (where to send the log output, performance
considerations) can carry on from there.

Based on Lubos's comments, I changed this once again, incompatibly:

* sal/log.h is now sal/log.hxx, and can thus only be used from C++ code. If we need it in a file that is still C, change that file to C++ first. (I see almost no need for any pure C files in LO at all. That many implementation files in, e.g., sal are written in C is a historic relic that can and should be fixed; I already did that recently for sal/source/rtl. The stable C header files in the URE interface are a different thing, of course.)

* The _S suffix is dropped from the logging macros using streaming, and the format-string variants are gone. A compile time check ensures the common case of streaming just a plain C-style string literal still produces reasonably compact call-site code.

* The format-string variants are still available in sal/detail/log.h, but only to be used in obsolete osl/diagnose.h etc., and going to be removed again eventually.

I noticed this change will break non-clean builds in odk, "cd odk && rm -rf ${INPATH?}" should help.

Stephan
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to