From 3986e1cb223cc86b74c2895e74a1eb600e892079 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 21 Jun 2016 09:08:02 +0200 Subject: Document limitations and good practice for logging category names Task-number: QTBUG-54238 Change-Id: I2b6f54fb26d24e6da19c0e09782483eeb10206e1 Reviewed-by: Leena Miettinen Reviewed-by: Michael Brasser --- src/corelib/io/qloggingcategory.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/corelib') diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp index b51085ef42..a0c6f4a6f4 100644 --- a/src/corelib/io/qloggingcategory.cpp +++ b/src/corelib/io/qloggingcategory.cpp @@ -80,6 +80,15 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift) \snippet qloggingcategory/main.cpp 1 + \note Category names are free text. However, to allow easy configuration + of the categories using \l{Logging Rules} the names should follow some rules: + \list + \li Use letters and numbers only. + \li Further structure categories into common areas by using dots. + \li Avoid the category names \c{debug}, \c{info}, \c{warning}, and \c{critical}. + \li Category names starting with \c{qt} are reserved for Qt modules. + \endlist + \section1 Checking Category Configuration QLoggingCategory provides \l isDebugEnabled(), \l isInfoEnabled(), -- cgit v1.2.3