I think QLog from QTopia was very good.
You define your category in your project and QLog will define a static bool for 
each category e.g.

# define QLOG_ENABLE(dbgcat) \
    class dbgcat##_QLog : public QLogBase { \
    public: \
                static inline bool enabled() { return 1; }\
    };

A log entry was done by:

# define qLog(dbgcat) if(!dbgcat##_QLog::enabled()); else 
dbgcat##_QLog::log(#dbgcat)

Misspelling can't be happening because you will get an compiler error.
No string compare are necessary because it uses the static category bool.
I think this is bloody fast and using this idea  + adding a config file to 
enable or disable Categories will be a good log system or not?
(http://codereview.qt-project.org/13226)

--
Wolfgang

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to