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 | ) |
|
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 | ) |
|
|
protected |
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, |
|
|
boolean[] |
wasCreated |
|
) |
| |
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 PATH_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, |
|
|
boolean[] |
wasCreated |
|
) |
| |
|
protected |
The 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 | ) |
|
Returns the number of log calls for this domain and logger.
- Parameters
-
- 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 | ) |
|
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 | ) |
|
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 | ) |
|
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 | ) |
|
Returns the priority of the Verbosity setting for the given logger number.
- Parameters
-
- Returns
- The priority.
◆ getRoot()
Returns the root domain of this object.
- Returns
- The root domain of this object
◆ getVerbosity()
Returns the domains Verbosity for the given logger number.
- Parameters
-
- Returns
- The found/defined domain Verbosity.
◆ isActive()
boolean isActive |
( |
int |
loggerNo, |
|
|
Verbosity |
statement |
|
) |
| |
Determines if the domain is active in respect to the given Verbosity.
- Parameters
-
- Returns
true
if domain is active (log should be performed)
◆ removeLogger()
void removeLogger |
( |
int |
loggerNo | ) |
|
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 | ) |
|
|
protected |
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()
This is for debugging purposes and for configuration output. E.g. this enables the Eclipse 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
boolean 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.
◆ PATH_SEPARATOR
final char PATH_SEPARATOR ='/' |
|
static |
◆ prefixLogables
ArrayList<PL> prefixLogables = new ArrayList<PL>() |
Prefix Logables associated with this domain.
◆ subDomains
◆ tAString
◆ tSubstring
◆ tSubstring2
The documentation for this class was generated from the following file: