printf question

Geert Janssens janssens-geert at telenet.be
Mon Mar 21 05:44:52 EDT 2011


On maandag 21 maart 2011, Christian Stimming wrote:
> Zitat von Stephen Brown <stephengrantbrown at mcmedia.com.au>:
> > run install.sh, open a Microsoft Vista Command prompt, and then
> > -------------------------------------------------------------------------
> > ---------- P:\soft\gnucash\inst\bin>gnucash-launcher.cmd
> > 
> > P:\soft\gnucash\inst\bin>
> > -------------------------------------------------------------------------
> > --------- Where does the output of the printf statement go?
> 
> If the start-up of gnucash still opens a separate console, it should
> go there. If we've switched off that separate console, it goes nowhere.
> 
Interesting, I didn't know that. Apparently, GnuCash doesn't open a separate 
console in the current build configuration. How would one go about doing this 
?

> My workaround for similar debugging steps is to use g_warning("Some
> number %d", some_number) instead of printf(), i.e. the function
> arguments of g_warning are the same as the ones of printf. Once the
> logging filename was set up correctly, your g_warning statements will
> at least show up there.
> 
Stephen attempted to add debugging information in gnucash-bin.c. This is also 
the part of the code file that starts the logging functionality. Depending on 
where in that file you want to add debugging information, the logger may or 
may not yet be initialized and hence g_warning may or may not work. This is a 
tricky one. For this particular case, the separate console would be a nice to 
have.

Geert


More information about the gnucash-devel mailing list