[Kde-bindings] Printing to the console

Pau Garcia i Quiles pgquiles at elpauer.org
Wed Jun 6 16:40:31 UTC 2007


Quoting Chris Gow <sniffy at rogers.com>:

> Hello:
>
> I usually print to the console for temporary debugging messages,  
> I've noticed that when I run a Qt/ruby program that output to the
> console is blocked until the application exits. What is the correct  
> way to log messages?

Do you mean "log" as in log4java? You have log4r  
(http://log4r.sourceforge.net/)

If you mean "log" as in "print temporary messages" when something  
happens, you need to "join" the Qt event-loop. For instance, print in  
a slot, or have a Qt::Timer to print, or something like that. Whatever  
is after the app.exec() runs after app.quit().

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to the amount of work, I usually need 10 days to answer)





More information about the Kde-bindings mailing list