Objects of this class represent a Log Domain of ALox. This class is internally used by class Lox.
Definition at line 63 of file domain.inl.
◆ CntLogCalls
A counter for the quantity of calls on this domain. Counting does not include:
- logs when no Logger was set
- conditional logs that were suppressed Otherwise, it includes all log calls, even when no Logger was enabled on this domain.
Definition at line 124 of file domain.inl.
◆ ConfigurationAlreadyRead
bool ConfigurationAlreadyRead =false |
Flag which is set when verbosity configuration data was read.
Definition at line 127 of file domain.inl.
◆ Data
Data stored per logger. The index is corresponding to the list of loggers in 'our' Lox.
Definition at line 111 of file domain.inl.
◆ FullPath
The full path of the domain (set in the constructor once) .
Definition at line 100 of file domain.inl.
◆ Name
The name of the domain. For root domains, this is nulled.
Definition at line 97 of file domain.inl.
◆ Parent
The parent domain. For root domains, this is nullptr
.
Definition at line 103 of file domain.inl.
◆ PrefixLogables
Prefix Logables associated with this domain.
Definition at line 117 of file domain.inl.
◆ SubDomains
A list of subdomains, sorted by name.
Definition at line 107 of file domain.inl.
◆ Domain() [1/2]
Constructor used for the root domain.
- Parameters
-
allocator | The monotonic allocator used allocation of permanent objects. |
pool | The pool allocator used allocation of non-permanent objects. |
name | The name of this root domains |
Definition at line 28 of file domain.cpp.
◆ Domain() [2/2]
Constructor
- Parameters
-
parent | The parent domain. For root domains, this is nullptr . |
name | The name of the domain. |
Definition at line 47 of file domain.cpp.
◆ AddLogger()
Adds a new entry in field Data and recursively demands the same from its Subdomains. Checks if a logger with the same name exists.
- Parameters
-
- Returns
- The number of the Logger, -1 if a logger with the same name exists already.
Definition at line 176 of file domain.inl.
◆ addLoggerRecursive()
◆ CountLoggers()
Returns the number of loggers stored in this domain (the same for all domains within a tree).
- Returns
- The number of loggers attached.
Definition at line 214 of file domain.inl.
◆ Find()
Searches a domain. If not found, the domain is (or path of domains are) created in the domain tree. If the path string starts with the character defined with Separator, then the search (and creation) is done starting from the root domain of this domain and not from this domain.
- Parameters
-
| domainPath | Path and domain to search. |
| maxCreate | The maximum number of subdomains that are created if not found at the end of the path. |
[out] | wasCreated | Output parameter that is set true if domain was not found and hence created. If nullptr , it is ignored. |
- Returns
- The domain found or created.
Definition at line 75 of file domain.cpp.
◆ findRecursive()
Domain * findRecursive |
( |
NSubstring & | domainPath, |
|
|
int | maxCreate, |
|
|
bool * | wasCreated ) |
|
protected |
Internal, recursive helper of Find.
- Parameters
-
| domainPath | Path to search. |
| maxCreate | The maximum number of subdomains that are created if not found at the end of the path. |
[out] | wasCreated | Output parameter that is set true if domain was not found and hence created. If nullptr , it is ignored. |
- Returns
- The domain found or created.
Definition at line 105 of file domain.cpp.
◆ GetCount()
int GetCount |
( |
int | loggerNo | ) |
|
|
inline |
Returns the number of log calls for this domain and logger.
- Parameters
-
loggerNo | The number of the Logger whose Verbosity is requested. |
- Returns
- The number of calls executed by this logger on this domain.
Definition at line 310 of file domain.inl.
◆ GetLogger() [1/2]
Searches and returns the Logger given by name.
- Parameters
-
loggerName | The logger to search. |
- Returns
- The Logger found corresponding to given name. If the Logger does not exist, nullptr is returned.
Definition at line 225 of file domain.inl.
◆ GetLogger() [2/2]
Returns logger of given number.
- Parameters
-
no | The number of the Logger to return. |
- Returns
- The Logger found with number no.
Definition at line 238 of file domain.inl.
◆ GetLoggerNo() [1/2]
int GetLoggerNo |
( |
const NString & | loggerName | ) |
|
|
inline |
Returns the number of the Logger specified by name.
- Parameters
-
loggerName | The logger name to search. |
- Returns
- The number of the Logger found corresponding to given name. If the Logger does not exist, -1 is returned.
Definition at line 250 of file domain.inl.
◆ GetLoggerNo() [2/2]
Returns the number of the Logger.
- Parameters
-
logger | The logger to search. |
- Returns
- The number of the Logger. If the Logger does not exist, -1 is returned.
Definition at line 263 of file domain.inl.
◆ GetPriority()
Returns the priority of the Verbosity setting for the given logger number.
- Parameters
-
loggerNo | The number of the Logger whose Verbosity is requested. |
- Returns
- The priority.
Definition at line 299 of file domain.inl.
◆ GetRoot()
Returns the root domain of this object.
- Returns
- The root domain of this object
Definition at line 161 of file domain.inl.
◆ GetVerbosity()
Returns the Log Domain's Verbosity for the given logger number.
- Parameters
-
loggerNo | The number of the Logger whose Verbosity is requested. |
- Returns
- The found/defined domain Verbosity.
Definition at line 289 of file domain.inl.
◆ IsActive()
bool IsActive |
( |
int | loggerNo, |
|
|
Verbosity | statement ) |
|
inline |
Determines if the domain is active in respect to the given Verbosity.
- Parameters
-
loggerNo | The number of the Logger whose Verbosity is to be evaluated against statement. |
statement | The Verbosity to check. |
- Returns
true
if domain is active (log should be performed)
Definition at line 323 of file domain.inl.
◆ RemoveLogger()
void RemoveLogger |
( |
int | loggerNo | ) |
|
|
inline |
Removes an new entry in field Data and recursively demands the same from its Subdomains.
- Parameters
-
loggerNo | The number of the Logger to be removed. |
Definition at line 196 of file domain.inl.
◆ removeLoggerRecursive()
void removeLoggerRecursive |
( |
int | loggerNo | ) |
|
|
protected |
◆ Separator()
static constexpr nchar Separator |
( |
| ) |
|
|
inlinestaticconstexpr |
- Returns
- Returns the domain path separation character.
Definition at line 135 of file domain.inl.
◆ SetVerbosity()
Sets the verbosity for a logger of this domain of all its subdomains to the specified value. If given priority is lower than those actually stored, nothing is set and recursion is stopped.
- Parameters
-
loggerNo | The number of the Logger to set the Verbosity for. |
verbosity | The verbosity value to set. |
priority | The priority of the setting. |
- Returns
- The new Verbosity.
Definition at line 198 of file domain.cpp.
◆ ToString()
Creates a string representation of this object.
- Parameters
-
Definition at line 226 of file domain.cpp.
The documentation for this class was generated from the following files: