[Libreoffice] How to write debug output to console or file?

Jan Holesovsky kendy at suse.cz
Fri Oct 29 05:05:34 PDT 2010


Hi Michael,

Michael Meeks píše v Pá 29. 10. 2010 v 12:14 +0100:

> > > The problem here is to get a C string from them: here are some
> examples:
> > >  * from OUString:
> > >     rtl::OUStringToOString( sOUStr, RTL_TEXTENCODING_UTF8
> ).getStr() 
> 
> 	Much as I hate the over-use of operator overloading, and the streams
> idiom; is there a good reason why we can't have some
> 
> 	osl::OutputStrm  << "foo" << aString << "\n";
> 
> 	type thing ? [ as long as we don't go wild and start using this mess
> all over the place ;-].
> 
> 	Thoughts ?

My complete history of tries & fails wrt. doing the debug output easier
is here:

http://www.openoffice.org/issues/show_bug.cgi?id=65920

At some stage I introduced std::cout << "foo " << aString << std::endl;
in ooo-build, but it was breaking the unit tests in tools:

commit 77951e773a286800967046730ff6e536eb7196aa
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Thu Jul 26 17:40:35 2007 +0000

    Kill, breaks tools unit tests (and is not much helpful anyway).
    
    * patches/src680/sal-oustring-debug.diff,
    patches/src680/apply: Kill, breaks tools unit tests (and is not much
    helpful anyway).

Could anybody here re-try & see what exactly was going on there?

Regards,
Kendy



More information about the LibreOffice mailing list