On 02/14/2012 08:22 PM, Koehne Kai (Nokia-MP/Berlin) wrote:
> Here's another idea:
>
> // in qlogging.h
> void qMessageLogEnabled(const char *area)
> #define QMessageArea(area) if (qMessageLogEnabled(area)) 
> QMessageLogger(__FILE__, __LINE__, Q_FUNC_INFO, area)
>
> Usage would be e.g.
>
> QMessageArea("MyArea").debug()<<  expensiveFunc();
> QMessageArea("MyArea").warning("%s", expensiveFunc());

Supporting both debug and warning statements tied to a category isn't 
useful. Warnings have always been unconditional and will remain so.

Removing that from your example gives almost the same syntax as qLog but 
with a different name and I think I've covered that already :)

-- 
Lincoln Ramsay - Senior Software Engineer
Qt Development Frameworks, Nokia - http://qt.nokia.com/
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to