diff options
author | Kai Koehne <kai.koehne@qt.io> | 2016-06-21 09:08:02 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2016-06-23 07:11:34 +0000 |
commit | 3986e1cb223cc86b74c2895e74a1eb600e892079 (patch) | |
tree | 589e7138117fd395eaed0c54919d829bac43e57a /src/corelib | |
parent | f4be16e1f7828a0f6992ef2e20b9106177d7fc88 (diff) |
Document limitations and good practice for logging category names
Task-number: QTBUG-54238
Change-Id: I2b6f54fb26d24e6da19c0e09782483eeb10206e1
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/io/qloggingcategory.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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(), |