ALox  V. 2402 R. 0
Home ALox for C++ ALox for C# ALox for Java Download
Nested namespaces | Classes | Enumerations
cs.aworx.lox Namespace Reference

Classes

class  ALox
 
class  ALoxReportWriter
 
class  ESC
 
class  Log
 
class  Lox
 

Enumerations

enum  Scope {
  Global, ThreadOuter, Filename, Method,
  ThreadInner, Path
}
 
enum  Verbosity {
  Verbose, Info, Warning, Error,
  Off
}
 

Enumeration Type Documentation

◆ Scope

enum Scope
strong

These are definitions which are used as a parameter to certain ALox methods to denote the Scope of a setting. Scopes are dependent of the programming language and hence differ slightly from each other in the different versions of ALox.

Note
ALox for C# implements scope mechanisms using scope information generated by method anotations. By default, debug logging supports such 'caller information', while release logging does not.
Therefore, in release-logging, the use of Scopes 'Path', 'Filename' and 'Method' will just default to an empty scope and therefore all reflect the same, shared scope, which is not very helpful. Therefore, for standard release logging, the use of the scope mechanisms should be be avoided, unless scope information is explicitly enabled.
For more information on Scopes consult the ALox user manual.
Enumerator
Global 

Denotes the global (singleton) scope

ThreadOuter 

Denotes the actual thread as the scope. When used with Scope Domains, 'inner' scopes can be defined optionally by multiple definitions.

Filename 

Denotes the actual source file as the scope

Method 

Denotes the actual method as the scope

ThreadInner 

Denotes the actual thread as the scope. When used with Scope Domains, 'inner' scopes can be defined optionally by multiple definitions.

Path 

Denotes the actual source path as the scope. By adding positive integer values to this element, 'outer' Scopes of this scope level itself can be defined using parent directories of the path.

◆ Verbosity

enum Verbosity
strong

This enum is used in ALox to control the 'verbosity' or 'verboseness' of the log output. The values herein - apart from special value 'Off' - are sorted in the following order

  • Verbose (highest level)
  • Info
  • Warning
  • Error (lowest level).

A value of this set is provided to ALox in two different ways: First, all methods of class Lox that execute a log operation assign a value of this enum to the Log Statement. Secondly, methods Lox.SetVerbosity, are defining the 'accepted' minimal Verbosity for a pair of <Logger/Log Domain>.

ALox, when executing a statement, checks both values against each other. A Log Statement is executed, when the <Logger/Log Domain> setting is set to the same or a 'higher level'. For example if a <Logger/Log Domain> setting is Warning, then Log Statements with associated Verbosity Warning and Error are executed and those with Info and Verbose are suppressed.

If special value Off is used with Lox.SetVerbosity, all logging is switched Off for this pair of <Logger/Log Domain>.

Some of the Log Statements accept the parameter directly (e.g. Lox.Entry, Lox.Once and Lox.If), others inherently use the right value as their method name suggests (e.g. Lox.Error, Lox.Warning, Lox.Info, Lox.Verbose and Lox.Assert). The latter group of methods do not support parameter Off.

If special value Off is used with those Log Statements, that allow to specify the Verbosity as a parameter, the Log Statement is never executed This is useful if the parameter is determined at runtime, depending on the state of an application.

Enumerator
Verbose 

The 'highest' level of Verbosity. Statements with this value associated are logged only if a Log Domain is set to Verbose as well.

Info 

The standard Verbosity for normal log output statements. Logged if a Log Domain is set to Info or Verbose.

Warning 

A Verbosity for warning messages, hence things that might lead to errors or are not welcome for other reasons, but maybe are not errors.
Logged if a Log Domain is set to Warning, Info or Verbose.

Error 

A Verbosity for error messages. It is suppressed only if a Log Domains' setting is Off.

Off 

Statements with this value associated are never logged (useful if Verbosity is evaluated at runtime). Log Domains with this setting do not execute any Log Statement.