Objects of this class represent a Log Domain of ALox. This class is internally used by class Lox.
◆ Domain()
Constructor for domain.
- Parameters
-
parent | The parent domain. For root domains, this is null. |
name | The name of the domain. For root domains, this is null. |
◆ AddLogger()
int AddLogger |
( |
Logger |
logger | ) |
|
|
inline |
Adds a new entry in field Data and recursively demands the same from its sub-domains. 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.
◆ addLoggerRecursive()
void addLoggerRecursive |
( |
Logger |
logger | ) |
|
|
inlineprotected |
Internal, recursive helper of AddLogger.
- Parameters
-
◆ CountLoggers()
Returns the number of loggers stored in this domain (the same for all domains within a tree).
- Returns
- The number of loggers attached.
◆ Find()
Domain Find |
( |
AString |
domainPathAS, |
|
|
int |
maxCreate, |
|
|
ref bool |
wasCreated |
|
) |
| |
|
inline |
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 in Separator, then the search (and creation) is done starting from the root domain of this domain and not from this domain.
- Parameters
-
| domainPathAS | Path and domain to search. |
| maxCreate | The maximum number of sub domains 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. |
- Returns
- The domain found or created.
◆ findRecursive()
Domain findRecursive |
( |
Substring |
domainPath, |
|
|
int |
maxCreate, |
|
|
ref bool |
wasCreated |
|
) |
| |
|
inlineprotected |
Internal, recursive helper of Find.
- Parameters
-
| domainPath | Path to search. |
| maxCreate | The maximum number of sub domains 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. |
- Returns
- The domain found or created.
◆ 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.
◆ GetLogger() [1/2]
Returns logger of given number.
- Parameters
-
no | The number of the Logger to return. |
- Returns
- The Logger found with number no.
◆ GetLogger() [2/2]
Logger GetLogger |
( |
String |
loggerName | ) |
|
|
inline |
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, null is returned.
◆ GetLoggerNo() [1/2]
int GetLoggerNo |
( |
Logger |
logger | ) |
|
|
inline |
Returns the number of a Logger.
- Parameters
-
logger | The logger to search. |
- Returns
- The number of the Logger. If the Logger does not exist, -1 is returned.
◆ GetLoggerNo() [2/2]
int GetLoggerNo |
( |
String |
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.
◆ GetPriority()
int GetPriority |
( |
int |
loggerNo | ) |
|
|
inline |
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.
◆ GetRoot()
Returns the root domain of this object.
- Returns
- The root domain of this object
◆ 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.
◆ 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 level. |
statement | The Verbosity to check. |
- Returns
true
if domain is active (log should be performed)
◆ RemoveLogger()
void RemoveLogger |
( |
int |
loggerNo | ) |
|
|
inline |
Removes an new entry in field Data and recursively demands the same from its sub-domains.
- Parameters
-
loggerNo | The number of the Logger to be removed |
◆ removeLoggerRecursive()
void removeLoggerRecursive |
( |
int |
loggerNo | ) |
|
|
inlineprotected |
Internal, recursive helper of RemoveLogger.
- Parameters
-
loggerNo | The number of the Logger to be removed. |
◆ SetVerbosity()
Sets the verbosity for a logger of this domain of all its sub domains 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.
◆ ToString()
override String ToString |
( |
| ) |
|
|
inline |
This is for debugging purposes and for configuration output. E.g. this enables the Monodevelop IDE to display object descriptions in the debugger.
- Returns
- A human readable string representation of this object.
◆ CntLogCalls
A counter for the quantity of calls on this domain. The 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.
◆ ConfigurationRead
bool ConfigurationRead =false |
Flag to which is set when verbosity configuration data was read.
◆ Data
Data stored per logger. The index is corresponding to the list of loggers in 'our' Lox.
◆ FullPath
The full path of the domain (set in the constructor once) .
◆ Name
The name of the domain. For root domains, this is null.
◆ Parent
The parent domain. For root domains, this is null.
◆ PrefixLogables
List<PL> PrefixLogables = new List<PL>() |
Prefix Logables associated with this domain.
◆ Separator
readonly char Separator ='/' |
|
static |
◆ SubDomains
◆ tAString
◆ tSubstring
◆ tSubstring2
The documentation for this class was generated from the following file: