Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index



On Tue, 2012-08-07 at 13:53 +0200, Stephan Bergmann wrote:
No, not for SAL_DEBUG.  (SAL_WARN requires an --enable-dbgutil build, 
but which developer doesn't do that, anyway?  SAL_INFO requires 
SAL_LOG=+WARN+INFO, but that's on purpose, to keep the default amount of 
output manageable.)

        Oh - nice; so SAL_DEBUG just works like an fprintf ? but the git hooks
help you stop committing it ?

    fprintf (stderr,"foo\n");

    goes directly, atomically to your terminal pausing the app until it's
out and it -just-works- (TM) ;-)

As does SAL_DEBUG (modulo the "pausing the app," which fprintf doesn't 
do either, at least not in a multithreaded process), with the added 
benefit that it is way simpler to output an OUString s with:

        I guess it's hard to git grep for sample instances of SAL_DEBUG since
there are none in the code ;-) might be nice to add some sample lines to
the header there; it seems to be a stream-style thing too.

As does SAL_DEBUG (modulo the "pausing the app," which fprintf
doesn't do either, at least not in a multithreaded process),

        In my experience writing to stderr is synchronous; ie.

        fprintf (stderr, "crash\n");
        *((int *)NULL) = 42;

        will do what you want; unless SAL_DEBUG guarantees that too it's too
dangerous to be useful for me :-)

        ATB,

                Michael.

-- 
michael.meeks@suse.com  <><, Pseudo Engineer, itinerant idiot


Context


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.