On Tuesday 07 of August 2012, Michael Meeks wrote:
On Tue, 2012-08-07 at 09:23 +0200, Stephan Bergmann wrote:
Folks, please do not pollute the sources with fprintf in the first
place.
Of course that doesn't belong in master but ...
Use SAL_INFO/SAL_WARN for permanent warning code (see
<http://wiki.documentfoundation.org/Development#Assertions_and_Logging>),
and use SAL_DEBUG for temporary debug output (that the LO git commit
hooks will prevent from accidentally becoming permanent).
I always use fprintf and never these other things. I can never remember
how to make SAL_WARN / SAL_INFO / SAL_DEBUG to actually output something
...
And - unfortunately, there's no way re-explaining it is going to help
me remember the detail ;-) -possibly- adding a:
./soffice --help-debug
section that explains what to set SAL_LOG to, and some of the other
environment variables to set to debug various other things might help
keep that near the front of people's minds but ...
I know it may be hard getting used to the idea of something in this codebase
being well-documented, but this stuff is, see sal/inc/sal/log.hxx .
--
Lubos Lunak
l.lunak@suse.cz
Context
- Re: [Libreoffice-commits] -Werror=format-security (continued)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.