On 01/24/2012 09:03 PM, ext [email protected] wrote: > One of the things still missing in the current debugging framework is > to categorize messages by area: This would allow you to > enable/disable e.g. debug messages for only one part of your app ... ... > That's at least what I got after doing 10 minutes of research :) > Question is whether we want to have any of the approaches (or both) > in QtCore?
Another data point... The qLog approach (from Qtopia) uses macros to turn "strings" into classnames. something like... DECLARE_CATEGORY(x) expanding to class QLog_Category_x ... Then qLog(x) expanded to if (!QLog_Category_x::enabled()); QLog_Category_x::debug() I guess the primary downside with this is the need to either centrally locate the declarations or duplicate the declarations in every .cpp file that needs them. However, this gives you string-based categories without the cost of string comparisons and I suspect the size cost of the logging messages is larger than the cost of the category classes. -- 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
