[Development] Adding qlogger to qtbase / dev branch

Lincoln Ramsay a1291762 at gmail.com
Sat Dec 22 03:25:18 CET 2012


On 21/12/12 11:20 PM, Koehne Kai wrote:
> Any thoughts on this?

Wolfgang will be happy if this finally goes in :)

I guess you were going to do this anyway but you might want to check 
that the code in the playground project is in a good state (esp 
regarding any changes to Qt 5 in the last 6 months) and conforms to the 
stated goal. I think we had unit tests and everything :)

I can't even remember clearly how we left the code. I think it was all 
"good to go" but I'm not sure. It seems a lifetime ago.

> (impl detail: might need a "declare" and a "implement" macro for libs to avoid duplicate symbols)

This was never done. It would be easier if we just dropped the macro 
(maybe it was only retained for legacy) and just encouraged people to 
declare/use the QLoggingCategory objects themselves. I believe we did 
fix the code so that you could do that without any problems (also helped 
with loading/unloading plugins that used categories).

> As a special case, the user can direct enabled messages to a file. This
> is done from the config file.

This functionality was removed. It was a bit hairy so we decided to just 
output via a message handler just like qDebug() does now. Anyone wanting 
to capture logs should implement a custom message handler. It was 
proposed to work on various pre-defined message handlers that did 
specific things (like outputting to a socket, file, etc.) but I don't 
think this was actually done.

-- 
Link




More information about the Development mailing list