This is a simple, 100% static wrapper of class Lox. In other words, this class incorporates one static singleton of Lox and mirrors the whole non static interface of Lox into a static one.
The exclusive use of this class covers the vast majority of all debug logging scenarios. For release logging, remote logging and similar scenarios, the use of a dedicated instance of class Lox is needed. All invocations of methods of Log are pruned in release code. (Using method annotation "[Conditional("ALOX_DBG_LOG")]" ).
Public Static Fields | |
static TextLogger | DebugLogger =null |
static ALoxReportWriter | DebugReportWriter =null |
static TextLogger | IDELogger =null |
static Lox | LOX =null |
Public Static Methods | |
static void | AddALibReportWriter (Lox lox=null, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | AddDebugLogger (Lox lox=null, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Assert (bool condition, Object logableOrDomain, Object optLog2=null, Object optLog3=null, Object optLog4=null, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | ClearSourcePathTrimRules (Reach reach=Reach.Global, bool allowAutoRule=true, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Entry (String domain, Verbosity verbosity, Object[] logables, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Error (Object logableOrDomain, Object optLog2=null, Object optLog3=null, Object optLog4=null, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static Logger | GetLogger (String loggerName, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | GetState (AString buf, Lox.StateInfo flags, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | If (bool condition, String domain, Verbosity verbosity, Object firstLog, Object optLog2=null, Object optLog3=null, Object optLog4=null, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | If (bool condition, Verbosity verbosity, Object firstLog, Object optLog2=null, Object optLog3=null, Object optLog4=null, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Info (Object logableOrDomain, Object optLog2=null, Object optLog3=null, Object optLog4=null, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | MapThreadName (String threadName, int id=-1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Once (Object logables, int quantity=1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Once (Object logables, Scope scope, int quantity=1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Once (Object logables, String group, int quantity=1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Once (Object logables, String group, Scope scope, int quantity=1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Once (String domain, Verbosity verbosity, Object logables, Scope scope=Scope.Global, int quantity=1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Once (String domain, Verbosity verbosity, Object logables, String group, Scope scope=Scope.Global, int quantity=1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Once (String domain, Verbosity verbosity, String logable, Scope scope=Scope.Global, int quantity=1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Once (String domain, Verbosity verbosity, String logable, String group, Scope scope=Scope.Global, int quantity=1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Once (String logable, int quantity=1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Once (String logable, Scope scope, int quantity=1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Once (String logable, String group, int quantity=1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Once (String logable, String group, Scope scope, int quantity=1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Once (Verbosity verbosity, Object logables, int quantity=1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Once (Verbosity verbosity, Object logables, Scope scope, int quantity=1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Once (Verbosity verbosity, Object logables, String group, int quantity=1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Once (Verbosity verbosity, Object logables, String group, Scope scope, int quantity=1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Once (Verbosity verbosity, String logable, int quantity=1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Once (Verbosity verbosity, String logable, Scope scope, int quantity=1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Once (Verbosity verbosity, String logable, String group, int quantity=1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Once (Verbosity verbosity, String logable, String group, Scope scope, int quantity=1, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | RemoveALibReportWriter ([CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | RemoveDebugLogger (Lox lox=null, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | RemoveLogger (Logger logger, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | RemoveLogger (Logger logger, ref bool wasFound, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | RemoveLogger (String loggerName, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | RemoveLogger (String loggerName, ref Logger logger, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | RemoveThreadDomain (String scopeDomain, Scope scope, Thread thread=null, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Reset () |
static Object | Retrieve (Scope scope=Scope.Global, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static Object | Retrieve (String key, Scope scope=Scope.Global, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | SetDomain (String scopeDomain, Scope scope, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | SetDomain (String scopeDomain, Scope scope, Thread thread, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | SetDomainSubstitutionRule (String domainPath, String replacement, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | SetPrefix (Object logable, Scope scope, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | SetPrefix (Object logable, Scope scope, Thread thread, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | SetPrefix (Object logable, String domain=null, Inclusion otherPLs=Inclusion.Include, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | SetSourcePathTrimRule (String path, Inclusion includeString=Inclusion.Exclude, int trimOffset=0, Case sensitivity=Case.Ignore, Reach reach=Reach.Global, String trimReplacement=null, int priority=Configuration.PrioDefaultValues, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | SetStartTime (DateTime? startTime=null, String loggerName=null, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | SetVerbosity (Logger logger, Verbosity verbosity, String domain="/", int priority=Configuration.PrioDefaultValues, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | SetVerbosity (String loggerName, Verbosity verbosity, String domain="/", int priority=Configuration.PrioDefaultValues, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | State (String domain, Verbosity verbosity, String headLine, Lox.StateInfo flags=Lox.StateInfo.All, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Store (Object data, Scope scope=Scope.Global, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Store (Object data, String key, Scope scope=Scope.Global, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | Verbose (Object logableOrDomain, Object optLog2=null, Object optLog3=null, Object optLog4=null, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
static void | WaitForKeyPress () |
static void | Warning (Object logableOrDomain, Object optLog2=null, Object optLog3=null, Object optLog4=null, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="") |
|
inlinestatic |
In the case that the original ALib ReportWriterStdIO is still in place, Report.PushWriter is invoked to provide a ReportWriter of type ALoxReportWriter.
lox | The lox that the ALoxReportWriter created will be using. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
This method creates an adequate/default debug logger (or multiple). Of-course, alternatively to using this method, a suitable set of debug loggers can be created manually. Also, before/after using this method additional debug loggers may be created.
In the current version of ALox (future changes are likely), this method does:
The name of the Logger created is "DEBUG_LOGGER"
. It will be registered with the standard Lox used for debug-logging, by setting Verbosities
'/'
andAn optionally created second, IDE-specific Logger will be named "IDE_LOGGER"
and will be registered with the standard Lox used for debug-logging with the same Verbosities as "DEBUG_LOGGER"
is.
Finally, this method invokes AddALibReportWriter.
lox | The lox to add the debug logger(s) to. If null, the static debug object LOX is used. Defaults to null. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Logs given logables only if the parameter condition is not true
. For this, Lox.Assert is invoked on static object LOX used for debug logging.
condition | If false , the Log Statement is executed. |
logableOrDomain | The first logable or the domain path. |
optLog2 | Optional logable (or the first logable if logableOrDomain was the domain). |
optLog3 | Optional logable. |
optLog4 | Optional logable. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Removes all local trimming rules set with SetSourcePathTrimRule. If parameter global is set to Inclusion.Include, the global rules are cleared in addition.
Setting parameter allowAutoRule to false
, allows to suppress the creation of an automatic rule based on the executables path.
reach | Denotes whether only local rules are cleared or also global ones. Defaults to Reach.Global. |
allowAutoRule | Determines if an auto rule should be tried to be detected next no appropriate rule is found. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Logs a Logable with the given Verbosity.
This method is usually not used directly. Instead, methods Info, Verbose, Warning and Error provide simpler interfaces which take a single logables that are collected in an array and then passed to this methods.
Note that the other methods accept an "external" list of boxes as a parameter as well. This means that also with these methods it is allowed to collect the logables in an user-specific Object
[] first and later pass them to the methods.
Hence, the use of this method is recommended only if the verbosity of a log statement is is evaluated only at runtime.
domain | Optional Log Domain which is combined with Scope Domains set for the Scope of invocation. |
verbosity | The verbosity. |
logables | The objects to log. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Logs the given Logables using Verbosity.Error. For this, Lox.Error is invoked on static object LOX used for debug logging.
logableOrDomain | The first logable or the domain path. |
optLog2 | Optional logable (or the first logable if logableOrDomain was the domain). |
optLog3 | Optional logable. |
optLog4 | Optional logable. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Retrieve an instance of a Logger by its name. This might be useful when access to a Logger is needed to change its configuration.
loggerName | The name of the Logger to search for (case insensitive). |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
This method collects state information about this lox in a formatted multi-line AString. Parameter flags is a bit field with bits defined in enum Lox.StateInfo.
buf | The target string. |
flags | Flag bits that define which state information is collected. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Logs a Logable only if the parameter condition is true
. For this, Lox.If is invoked on static object LOX used for debug logging.
condition | If false , the Log Statement is executed. |
domain | Optional Log Domain which is combined with Scope Domains set for the Scope of invocation. |
verbosity | The verbosity. |
firstLog | The first logable or the domain path. |
optLog2 | Optional logable |
optLog3 | Optional logable. |
optLog4 | Optional logable. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Logs a Logable only if the parameter condition is true
. For this, Lox.If is invoked on static object LOX used for debug logging. This overloaded version omits parameter domain.
condition | If false , the Log Statement is executed. |
verbosity | The verbosity. |
firstLog | The first logable or the domain path. |
optLog2 | Optional logable |
optLog3 | Optional logable. |
optLog4 | Optional logable. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Logs the given Logables using Verbosity.Info. For this, Lox.Info is invoked on static object LOX used for debug logging.
logableOrDomain | The first logable or the domain path. |
optLog2 | Optional logable (or the first logable if logableOrDomain was the domain). |
optLog3 | Optional logable. |
optLog4 | Optional logable. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
This method sets a human readable name to the given thread ID (or current thread) which is optionally included in each log line.
threadName | The name of the thread as it should be displayed in the logs |
id | (Optional) Parameter providing the thread ID. If omitted, the current thread's ID is used. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Overloaded version of Once.
logables | The object(s) to log. (Multiple objects may be provided as an Object[].). |
quantity | The number of logs to be performed. As the name of the method indicates, this defaults to 1 . |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Overloaded version of Once.
logables | The object(s) to log. (Multiple objects may be provided as an Object[].). |
scope | The Scope that the group or counter is bound to. |
quantity | The number of logs to be performed. As the name of the method indicates, this defaults to 1 . |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Overloaded version of Once.
logables | The object(s) to log. (Multiple objects may be provided as an Object[].). |
group | The optional name of the statement group . If used, all statements that share the same group name are working on the same counter (according to the scope.) If omitted (or empty or null), the counter is is bound to the Scope provided. If omitted and scope is Scope.Global, then the counter is associated exclusively with the single Log Statement itself. |
quantity | The number of logs to be performed. As the name of the method indicates, this defaults to 1 . |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Overloaded version of Once.
logables | The object(s) to log. (Multiple objects may be provided as an Object[].). |
group | The optional name of the statement group . If used, all statements that share the same group name are working on the same counter (according to the scope.) If omitted (or empty or null), the counter is is bound to the Scope provided. If omitted and scope is Scope.Global, then the counter is associated exclusively with the single Log Statement itself. |
scope | The Scope that the group or counter is bound to. |
quantity | The number of logs to be performed. As the name of the method indicates, this defaults to 1 . |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Overloaded version of Once.
domain | Optional Log Domain which is combined with Scope Domains set for the Scope of invocation. |
verbosity | The Verbosity of the Log Statement (if performed). |
logables | The object(s) to log. (Multiple objects may be provided as an Object[].). |
scope | The Scope that the group or counter is bound to. |
quantity | The number of logs to be performed. As the name of the method indicates, this defaults to 1 . |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Logs given logables once, up to quantity times or every n-th time. In its simplest overloaded version, the counter is bound to the source code line, hence, only the first execution of this exact Log Statement is executed.
Using parameter group, a set of Log Statements that share the same group key, can be grouped and of such set, only the one which is first executed actually logs.
Alternatively, when key is omitted (or null or empty), but a Scope is given with parameter scope, then the counter is associated with the scope.
Finally, parameters key and scope can also be used in combination. The key is then unique in respect to the Scope provided.
Using, none, one or both of the parameters group and scope, among others, the following use cases can be achieved.
When parameter quantity is a negative value, the log statement is executed every n-th time instead n-times. E.g, if quantity is -5
, the first statement is executed and afterwards every fifth invocation.
Object
[] may be passed with parameter logables, like in the following sample: domain | Optional Log Domain which is combined with Scope Domains set for the Scope of invocation. |
verbosity | The Verbosity of the Log Statement (if performed). |
logables | The object(s) to log. (Multiple objects may be provided as an Object[].) |
group | The optional name of the statement group . If used, all statements that share the same group name are working on the same counter (according to the scope.) If omitted (or empty or null), the counter is is bound to the Scope provided. If omitted and scope is Scope.Global, then the counter is associated exclusively with the single Log Statement itself. |
scope | The Scope that the group or counter is bound to. |
quantity | The number of logs to be performed. As the name of the method indicates, this defaults to 1 . If negative, the first and every "-quantity-th" statement is executed. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Overloaded version of Once.
domain | Optional Log Domain which is combined with Scope Domains set for the Scope of invocation. |
verbosity | The Verbosity of the Log Statement (if performed). |
logable | The string message to log. |
scope | The Scope that the group or counter is bound to. |
quantity | The number of logs to be performed. As the name of the method indicates, this defaults to 1 . |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Overloaded version of Once.
domain | Optional Log Domain which is combined with Scope Domains set for the Scope of invocation. |
verbosity | The Verbosity of the Log Statement (if performed). |
logable | The string message to log. |
group | The optional name of the statement group . If used, all statements that share the same group name are working on the same counter (according to the scope.) If omitted (or empty or null), the counter is is bound to the Scope provided. If omitted and scope is Scope.Global, then the counter is associated exclusively with the single Log Statement itself. |
scope | The Scope that the group or counter is bound to. |
quantity | The number of logs to be performed. As the name of the method indicates, this defaults to 1 . |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Overloaded version of Once.
logable | The string message to log. |
quantity | The number of logs to be performed. As the name of the method indicates, this defaults to 1 . |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Overloaded version of Once.
logable | The string message to log. |
scope | The Scope that the group or counter is bound to. |
quantity | The number of logs to be performed. As the name of the method indicates, this defaults to 1 . |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Overloaded version of Once.
logable | The string message to log. |
group | The optional name of the statement group . If used, all statements that share the same group name are working on the same counter (according to the scope.) If omitted (or empty or null), the counter is is bound to the Scope provided. If omitted and scope is Scope.Global, then the counter is associated exclusively with the single Log Statement itself. |
quantity | The number of logs to be performed. As the name of the method indicates, this defaults to 1 . |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Overloaded version of Once.
logable | The string message to log. |
group | The optional name of the statement group . If used, all statements that share the same group name are working on the same counter (according to the scope.) If omitted (or empty or null), the counter is is bound to the Scope provided. If omitted and scope is Scope.Global, then the counter is associated exclusively with the single Log Statement itself. |
scope | The Scope that the group or counter is bound to. |
quantity | The number of logs to be performed. As the name of the method indicates, this defaults to 1 . |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Overloaded version of Once.
verbosity | The Verbosity of the Log Statement (if performed). |
logables | The object(s) to log. (Multiple objects may be provided as an Object[].). |
quantity | The number of logs to be performed. As the name of the method indicates, this defaults to 1 . |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Overloaded version of Once.
verbosity | The Verbosity of the Log Statement (if performed). |
logables | The object(s) to log. (Multiple objects may be provided as an Object[].). |
scope | The Scope that the group or counter is bound to. |
quantity | The number of logs to be performed. As the name of the method indicates, this defaults to 1 . |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Overloaded version of Once.
verbosity | The Verbosity of the Log Statement (if performed). |
logables | The object(s) to log. (Multiple objects may be provided as an Object[].). |
group | The optional name of the statement group . If used, all statements that share the same group name are working on the same counter (according to the scope.) If omitted (or empty or null), the counter is is bound to the Scope provided. If omitted and scope is Scope.Global, then the counter is associated exclusively with the single Log Statement itself. |
quantity | The number of logs to be performed. As the name of the method indicates, this defaults to 1 . |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Overloaded version of Once.
verbosity | The Verbosity of the Log Statement (if performed). |
logables | The object(s) to log. (Multiple objects may be provided as an Object[].). |
group | The optional name of the statement group . If used, all statements that share the same group name are working on the same counter (according to the scope.) If omitted (or empty or null), the counter is is bound to the Scope provided. If omitted and scope is Scope.Global, then the counter is associated exclusively with the single Log Statement itself. |
scope | The Scope that the group or counter is bound to. |
quantity | The number of logs to be performed. As the name of the method indicates, this defaults to 1 . |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Overloaded version of Once.
verbosity | The Verbosity of the Log Statement (if performed). |
logable | The string message to log. |
quantity | The number of logs to be performed. As the name of the method indicates, this defaults to 1 . |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Overloaded version of Once.
verbosity | The Verbosity of the Log Statement (if performed). |
logable | The string message to log. |
scope | The Scope that the group or counter is bound to. |
quantity | The number of logs to be performed. As the name of the method indicates, this defaults to 1 . |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Overloaded version of Once.
verbosity | The Verbosity of the Log Statement (if performed). |
logable | The string message to log. |
group | The optional name of the statement group . If used, all statements that share the same group name are working on the same counter (according to the scope.) If omitted (or empty or null), the counter is is bound to the Scope provided. If omitted and scope is Scope.Global, then the counter is associated exclusively with the single Log Statement itself. |
quantity | The number of logs to be performed. As the name of the method indicates, this defaults to 1 . |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Overloaded version of Once.
verbosity | The Verbosity of the Log Statement (if performed). |
logable | The string message to log. |
group | The optional name of the statement group . If used, all statements that share the same group name are working on the same counter (according to the scope.) If omitted (or empty or null), the counter is is bound to the Scope provided. If omitted and scope is Scope.Global, then the counter is associated exclusively with the single Log Statement itself. |
scope | The Scope that the group or counter is bound to. |
quantity | The number of logs to be performed. As the name of the method indicates, this defaults to 1 . |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Removes the report writer created with AddALibReportWriter.
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Removes the Logger(s) which was/were created by AddDebugLogger. This method also invokes Report.PopWriter to install a default ReportWriter for ALib.
lox | The lox to remove the debug logger(s) from. If null, the static debug object::LOX is used. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Removes a logger from this container.
logger | The logger to be removed. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Removes a logger from this container.
logger | The logger to be removed. | |
[out] | wasFound | Output parameter that is set to true , if the Logger was found and removed, to false otherwise. |
cln | (Optional) Caller info, compiler generated. Please omit. | |
csf | (Optional) Caller info, compiler generated. Please omit. | |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Removes logger named loggerName from this container.
loggerName | The name of the Logger to be removed (case insensitive). |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Removes logger named loggerName from this container.
loggerName | The name of the Logger to be removed (case insensitive). | |
[out] | logger | Output parameter that returns the Logger that was removed, to null if not found. |
cln | (Optional) Caller info, compiler generated. Please omit. | |
csf | (Optional) Caller info, compiler generated. Please omit. | |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
This method is used to remove an explicitly given domain path from the list of domain paths set for Scope.ThreadOuter or Scope.ThreadInner.
To remove the most recently added domain path from such thread-related Scope, use one of the overloaded methods SetDomain and provide an empty or nulled value for parameter scopeDomain (the same as how domain paths of other Scopes are removed).
scopeDomain | The domain path to register. |
scope | Either Scope.ThreadOuter or Scope.ThreadInner. With other values, an internal error is logged. |
thread | The thread to set/unset a thread-related Scope Domains for. Defaults to the current thread. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
This method disposes the internal static Lox and with it all loggers, preferences and stuff and replaces it with a fresh one. The method was added to support clean unit testing.
|
inlinestatic |
Overloaded version of Retrieve which omits parameter key.
scope | The Scope that the data is bound to. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
null
if nothing was found.
|
inlinestatic |
Retrieves ALox Log Data which was previously stored using Store. Optional parameters key and scope offer various possibilities to reference such objects.
key | The optional key to the data. If omitted (or empty or null), the data is bound to the Scope provided. If omitted and scope is Scope.Global, then the data is unique to the Lox. |
scope | The Scope that the data is bound to. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
null
if nothing was found.
|
inlinestatic |
The given scopeDomain becomes the default domain path for given scope. This means, that any subsequent log invocations (from within this same scope) can omit the domain parameter, or if they provide one, this Scope Domain path is prepended. If subsequent log calls specify a domain name with a leading '/' character, then the Scope Domain of the scope is ignored.
Furthermore, if the given scope is an inner scope, outer scopes are prepended to the given scopeDomain when the resulting domain of a log invocation is evaluated. Again, this behavior can be overruled by prepending a leading '/' character to scopeDomain.
To remove a previously set Scope Domain a nulled or empty string has to be passed with parameter scopeDomain.
For Scope.ThreadOuter and Scope.ThreadInner, passing an empty or nulled string removes the most recently added domain path. For removing an explicitly named domain path of Scope.ThreadOuter and Scope.ThreadInner use method RemoveThreadDomain.
scopeDomain | The domain path to register. |
scope | The scope that should the given domain be registered for. Available Scope definitions are platform/language dependent. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
This overloaded version of SetDomain is applicable only for Scope.ThreadOuter and Scope.ThreadInner and allows to specify the thread that the setting should be associated with.
If scopeDomain is null or empty, the most recently added domain path is removed. For removing an explicitly named domain associated with a thread use method RemoveThreadDomain.
scopeDomain | The domain path to register. |
scope | Either Scope.ThreadOuter or Scope.ThreadInner. With other values, an internal error is logged. |
thread | The thread to set/unset a thread-related Scope Domains for. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Adds a Domain Substitution Rule. Domain Substitution is performed as a last step when evaluating the domain path of a Log Statement, taking Scope Domains and the optional parameter domain of the statement into account.
Wildcards
Parameter domainPath supports 'wildcard' character '*'
at its beginning and at its end (or both). This allows to have four types of rules:
*
at the end of domainPath)*
at the start of domainPath)*
at both, start and the end of domainPath)Only minimal checks are performed, e.g. if an exact match is requested, but domainPath does not start with character '/'
. In this and some other cases, the rule is not stored and an internal warning is logged. Further checks, for example for illegal domain path characters are not performed (those will be eliminated when the resulting domain path is to be created internally).
Circular Dependencies
If the given rules have circular dependencies, only a limited number (ten) replacements are performed. If this number of replacements for one Log Statement is exceeded, an internal warning message is logged. This is done only once over the life-time of a Logger.
Application of Rules
Rules are applied in the order of their definition. After all rules have been applied this is repeated as long as at least one rule matched (up to ten times).
Deletion of Rules To delete a rule, invoke the method with same parameter domainPath and a 'nulled' or empty string for parameter replacement. To delete all rules, invoke the method with parameter domainPath 'nulled' or empty.
Final remarks Domain substitution is useful to permanently change ('redirect') domain paths of 3rd party code (e.g. libraries using ALox) or log statements that must not be changed for other reasons. It is advised to not 'overuse' this feature, as side effects are inherent to the concept of Domain Substitution. For example, an unwanted side effect might be that Prefix Logables are not applicable to the substituted domain, while other Prefix Logables are bound to the resulting domain.
For Lox objects that should be protected of external manipulation, it is advisable, to remove all Domain Substitution Rules right after the Lox was created by invoking this method with a nulled value for parameter domainPath. The reason is, that otherwise, through configuration files or command line parameters, domains of the Lox can be substituted and then the resulting domains Verbosities be overwritten using further configuration variables. Any prioritized 'internal' setting of Verbosities this way could be circumvented!
For more information consult the ALox User Manual.
domainPath | The path to search. Has to start with either '/' or '*' . |
replacement | The replacement path. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
The given prefix becomes a Prefix Logable provided to loggers with each log statement executed within the given scope. The list of objects received by a logger is sorted from outer scope to inner scope. The logable of the Log Statement itself, is the last in the list, except one or more Prefix Logables of Scope.ThreadInner are set. Those are (similar to how this Scope is used with Scope Domains) appended to the end of the list.
To remove a previously set Prefix Logable, null
has to be passed with parameter logable. For Scope.ThreadOuter and Scope.ThreadInner, passing null
removes the most recently added Prefix Logable.
logable | The Prefix Logable to set. |
scope | The scope that should the given logable be registered for. Available Scope definitions are platform/language dependent. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
This overloaded version of SetPrefix is applicable only for Scope.ThreadOuter and Scope.ThreadInner and allows to specify the thread that the setting should be associated with.
If logable is null, the most recently added Prefix Logable is removed.
logable | The Prefix Logable to set. |
scope | Either Scope.ThreadOuter or Scope.ThreadInner. With other values, an internal error is logged. |
thread | The thread to set/unset a thread-related Prefix Logable for. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
The given logable becomes a Prefix Logable associated to the given Log Domain. Prefix Logables associated with the Log Domain are added to the list of Logables right before the main Logable of the Log Statement itself. Multiple Prefix Logables can be added per Log Domain.
To remove the most recently added Prefix Logable associated with a Log Domain, null
has to be passed with parameter logable.
""
which addresses the domain evaluated for the current scope.logable | The Prefix Logable to set. |
domain | The domain path. Defaults to null , resulting in evaluated Scope Domain path. |
otherPLs | If set to Inclusion.Exclude , scope-related Prefix Logables are ignored and only domain-related Prefix Logables are passed to the Loggers. Defaults to Inclusion.Include . |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Adds path to an internal list of substrings that are used to trim the path of a source file name. Trimmed paths are used for Scope mechanisms and can be logged (e.g. with meta information of class TextLogger.
By default such setting affects all instances of class Lox, not only this instance. This can be altered using parameter global. one other The given trim information can either
If given path starts with character '*'
, the rest of the string is searched within source paths. Otherwise, it is checked if a source path starts with the given path.
Parameter includeString determines if the searched substring should be included in the resulting source path or not. In addition, parameter trimOffset, which can be negative or positive, is added to the position of trimming. This can be used to increase the length of the search path, and then cut only a portion of what was searched for.
Parameter trimReplacement optionally provides a replacement string for the trimmed path. This can be used for example to provide the right absolute path for an IDE to find source files of a library.
Finally, parameter sensitivity determines whether the match is performed case sensitive or not. It defaults to non-sensitive, for convenience and for the fact that for example Microsoft C++ compilers' preprocessor passes lower case path-strings!
'/'
, then characters '\'
found in parameters path and trimReplacement are replaced by '\'
and vice versa. This allows to specify paths and substrings thereof in a platform independent way.Inclusion.Include
) is not protected by a mutex
against concurrent access. Therefore, global rules have to be either at bootstrap of a process, before threads are created, or such creation has to 'manually' be protected by locking all existing instances of this class!path | The path to search for. If not starting with '*' , a prefix is searched. |
includeString | Determines if path should be included in the trimmed path or not. Optional and defaults to Inclusion.Exclude. |
trimOffset | Adjusts the portion of path that is trimmed. Optional and defaults to 0 . |
sensitivity | Determines if the comparison of path with a source files' path is performed case sensitive or not. Optional and defaults to Case.Ignore. |
reach | Denotes whether the rule is applied locally (to this Lox only) or applies to all instances of class Lox. Defaults to Reach.Global. |
trimReplacement | Replacement string for trimmed portion of the path. Optional and defaults to NullString. |
priority | The priority of the setting. Defaults to Configuration.PrioDefaultValues. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
This method is used reset (or to explicitly set) the start time of the Logger(s). The only impact is the output of time differences in the log lines. Hence, it is useful to see some absolute time values when doing basic performance tests using the Logger.
startTime | Optional parameter with the new start time. Defaults to current time if omitted. |
loggerName | The name of the Logger(s) whose start time is to be set (case insensitive). Defaults to empty string, which indicates that all loggers are to be affected. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Sets the Verbosity of the Log Domain which is evaluated from parameter domain and applicable Scope Domains. The verbosity given, is set recursively for all sub-domains.
With the first invocation of this method for a distinct logger, this Logger is registered with this Lox. In this case, prior to setting the given Verbosity for the evaluated sub-domain, the Verbosity for all domains is set to Verbosity.Off.
To deregister a Logger with a Lox, use method RemoveLogger. To 'disable' a Logger, invoke this method with parameters verbosity equaling to Verbosity.Off and domain to "/"
.
Optional parameter priority defaults to Configuration.PrioDefaultValues, which is a lower priority than those of the standard plug-ins of external configuration data. Therefore, external configuration by default 'overwrite' settings made from 'within the source code', which simply means by invoking this method.
The parameter can be provided for two main reasons:
Configuration.PrioDefaultValues + 1
, then this sub-domain will not be affected by future invocations of this method with standard-priority given. '/'
, which suppresses the concatenation of Scope Domains. '/'
, while with other methods of this class, it defaults to an empty string.logger | The logger to be to be affected. |
domain | The domain to be set (including sub-domains). Defaults to root domain "/". |
verbosity | The 'level of verboseness' to be set. |
priority | The priority of the setting. Defaults to Configuration.PrioDefaultValues. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Same as SetVerbosity but addressing the Logger to manipulate by its name.
This method may only be used after a Logger was once 'registered' with this Lox using SetVerbosity.
loggerName | The logger to be to be affected, identified by its name (case insensitive). |
domain | The domain to be set (including sub-domains). Defaults to root domain "/". |
verbosity | The 'level of verboseness' to be set. |
priority | The priority of the setting. Defaults to Configuration.PrioDefaultValues. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
This method logs the current configuration of this Lox and its encapsulated objects. It uses method GetState to assemble the logable string.
domain | Optional Log Domain which is combined with Scope Domains set for the Scope of invocation. |
verbosity | The verbosity. |
headLine | If given, a separated headline will be logged at first place. |
flags | Flag bits that define which state information is logged. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Overloaded version of Store(Object*,const TString&,Scope,int) "Store" which omits parameter key.
data | The data object to store. If null , currently stored data will be removed. |
scope | The Scope that the data is bound to. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Stores an object which can afterwards be retrieved by invoking Retrieve. Optional parameters key and scope offer various possibilities to reference this data later.
To remove data from the store, pass null
with parameter data.
new
) may be passed!data | The data object to store. If null , currently stored data will be removed. |
key | The optional key to the data. If omitted (or empty or null), the data is bound to the Scope provided. If omitted and scope is Scope.Global, then the data is unique to the Lox. |
scope | The Scope that the data is bound to. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
Logs the given Logables using Verbosity.Verbose. For this, Lox.Verbose is invoked on static object LOX used for debug logging.
logableOrDomain | The first logable or the domain path. |
optLog2 | Optional logable (or the first logable if logableOrDomain was the domain). |
optLog3 | Optional logable. |
optLog4 | Optional logable. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
inlinestatic |
This method is convenient to use in console applications at the end of the main() method. It checks if this process has a console window and a Visual Studio debug session is running. Such applications will otherwise close the console window when the application exits. The method returns immediately, if the aforementioned condition is false as well as in release compilations.
|
inlinestatic |
Logs the given Logables using Verbosity.Warning. For this, Lox.Warning is invoked on static object LOX used for debug logging.
logableOrDomain | The first logable or the domain path. |
optLog2 | Optional logable (or the first logable if logableOrDomain was the domain). |
optLog3 | Optional logable. |
optLog4 | Optional logable. |
cln | (Optional) Caller info, compiler generated. Please omit. |
csf | (Optional) Caller info, compiler generated. Please omit. |
cmn | (Optional) Caller info, compiler generated. Please omit. |
|
static |
The debug logger created by AddDebugLogger.
|
static |
The ALib ReportWriter. This will be created and registered in method Log.AddDebugLogger and removed in Log.RemoveDebugLogger in the case that the original ALib ReportWriterStdIO is in place.
|
static |
An (additional) IDE specific logger, that might be created by AddDebugLogger.
|
static |
This is a static singleton of type class Lox which is used for standard debug logging statements.