|
KanoopCommonQt 2.1.1
Kanoop foundational Qt utility library
|
|
A named logging category with an associated minimum log level. More...
#include <logcategory.h>
Public Member Functions | |
| LogCategory () | |
| Default constructor — creates an invalid (unnamed) category at the default level. | |
| LogCategory (const QString &name) | |
| Construct a named category at the default log level. | |
| QString | name () const |
| Return the category name. | |
| LogLevel | level () const |
| Return the minimum log level for this category. | |
| LogCategory | append (const QString &name) |
| Create a new category by appending a sub-name to this category's name. | |
| LogCategory | prepend (const QString &name) |
| Create a new category by prepending a prefix to this category's name. | |
| bool | isValid () const |
| Test whether this category has a non-empty name. | |
Static Public Member Functions | |
| static QString | parentName (const QString &name) |
| Extract the parent portion of a dotted category name. | |
| static LogLevel | defaultLogLevel () |
| Return the process-wide default log level used for new categories. | |
| static void | setDefaultLogLevel (LogLevel value) |
| Set the process-wide default log level used for new categories. | |
Static Public Attributes | |
| static LogLevel | DefaultLogLevel |
| Process-wide default log level applied to newly created categories. | |
Protected Attributes | |
| QString | _name |
| Category name string. | |
| LogLevel | _level |
| Minimum log level threshold for this category. | |
A named logging category with an associated minimum log level.
Categories allow fine-grained control over which log messages are emitted. Each category has a name and a level; messages logged below the category level are suppressed even if they would otherwise pass the global logger level.
Definition at line 33 of file logcategory.h.
|
inline |
Default constructor — creates an invalid (unnamed) category at the default level.
Definition at line 37 of file logcategory.h.
|
inline |
Construct a named category at the default log level.
| name | Category name string |
Definition at line 43 of file logcategory.h.
| LogCategory Log::LogCategory::append | ( | const QString & | name | ) |
Create a new category by appending a sub-name to this category's name.
| name | Sub-name to append (separated by '.') |
|
inlinestatic |
Return the process-wide default log level used for new categories.
Definition at line 84 of file logcategory.h.
|
inline |
Test whether this category has a non-empty name.
Definition at line 96 of file logcategory.h.
|
inline |
Return the minimum log level for this category.
Definition at line 57 of file logcategory.h.
|
inline |
|
static |
Extract the parent portion of a dotted category name.
| name | Full dotted category name |
| LogCategory Log::LogCategory::prepend | ( | const QString & | name | ) |
Create a new category by prepending a prefix to this category's name.
| name | Prefix to prepend (separated by '.') |
|
inlinestatic |
Set the process-wide default log level used for new categories.
| value | New default LogLevel |
Definition at line 90 of file logcategory.h.
|
protected |
Minimum log level threshold for this category.
Definition at line 105 of file logcategory.h.
|
protected |
Category name string.
Definition at line 103 of file logcategory.h.
|
static |
Process-wide default log level applied to newly created categories.
Definition at line 99 of file logcategory.h.