ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
Nested namespaces | Classes | Enumerations
aworx::lib::lox Namespace Reference


This is the C++ version of ALox Logging Library, which has been integrated as one of many modules into the ALib C++ Class Library.

Please check out the documentation of ALib Module ALox for more information.

Nested namespaces

 detail
 
 loggers
 

Classes

class  ALox
 
class  ALoxReportWriter
 
class  ESC
 
class  Log
 
class  LogTools
 
class  Lox
 

Enumerations

enum  Scope {
  Global, ThreadOuter, Filename, Method,
  ThreadInner, Path
}
 
enum  StateInfo {
  NONE = 0, Basic = 1 << 0, Version = 1 << 1, Loggers = 1 << 2,
  Domains = 1 << 3, InternalDomains = 1 << 4, ScopeDomains = 1 << 5, DSR = 1 << 6,
  PrefixLogables = 1 << 7, Once = 1 << 8, LogData = 1 << 9, ThreadMappings = 1 << 10,
  SPTR = 1 << 20, CompilationFlags = 1 << 21, All = ~0L
}
 
enum  Variables {
  NO_IDE_LOGGER = 1, CONSOLE_TYPE = 2, VERBOSITY = 3, SPTR_GLOBAL = 4,
  SPTR_LOX = 5, DOMAIN_SUBSTITUTION = 6, PREFIXES = 7, DUMP_STATE_ON_EXIT = 8,
  AUTO_SIZES = 20, FORMAT = 21, FORMAT_DATE_TIME = 22, FORMAT_MULTILINE = 23,
  FORMAT_TIME_DIFF = 24, MAX_ELAPSED_TIME = 25, REPLACEMENTS = 26, CONSOLE_LIGHT_COLORS = 27,
  CODEPAGE = 28
}
 
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.

This enumeration is an ALib arithmetical enum. However, the addition of values is only allowed with the last element, Path. By adding integer values, the Nth parent directory of a source file's location are addressed. As an example, invocations like this are used to select the source directory two levels above the source code file for a prefix scope:

 lox->SetPrefix( "#> ", Scope::Path + 2 );
Note
ALox for C++ implements scope mechanisms using scope information generated by the preprocessor. 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 the 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 how to change the defaults, see documentation of preprocessor symbols ALOX_DBG_LOG_CI and ALOX_REL_LOG_CI.

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 integral values to this element (the enum type is an ALib arithmetical enum), 'outer' Scopes of this scope level itself can be defined using parent directories of the path.

Definition at line 149 of file alox/alox.hpp.

◆ StateInfo

enum StateInfo
strong

Denotes flags used with methods Lox::GetState and Lox::State to select different parts of the state receive.

Enumerator
NONE 

No state.

Basic 

Name and number of log calls.

Version 

Library Version and thread safeness.

Loggers 

Loggers.

Domains 

Log domains currently registered.

InternalDomains 

Internal domains.

ScopeDomains 

Scope domains.

DSR 

Domain substitution rules.

PrefixLogables 

Prefix logables.

Once 

Log once counters.

LogData 

Log data objects.

ThreadMappings 

Named threads.

SPTR 

Source path trim rules.

CompilationFlags 

ALib/ALox compilation flags

Definition at line 37 of file lox.inl.

◆ Variables

enum Variables
strong

Configuration variables uses by ALox

Enumerator
NO_IDE_LOGGER 

Configuration variable used by Log::AddDebugLogger.

CONSOLE_TYPE 

Configuration variable used by Lox::CreateConsoleLogger.

VERBOSITY 

Configuration variable ALOX_LOXNAME_LOGGERNAME_VERBOSITY .

SPTR_GLOBAL 

Configuration variable ALOX_GLOBAL_SOURCE_PATH_TRIM_RULES .

SPTR_LOX 

Configuration variable used by class Lox.

DOMAIN_SUBSTITUTION 

Configuration variable used by class Lox.

PREFIXES 

Configuration variable used by class Lox.

DUMP_STATE_ON_EXIT 

Configuration variable used by class Lox.

AUTO_SIZES 

Configuration variable used by class TextLogger.

FORMAT 

Configuration variable used by class TextLogger.

FORMAT_DATE_TIME 

Configuration variable used by class TextLogger.

FORMAT_MULTILINE 

Configuration variable used by class TextLogger.

FORMAT_TIME_DIFF 

Configuration variable used by class TextLogger.

MAX_ELAPSED_TIME 

Configuration variable used by class TextLogger.

REPLACEMENTS 

Configuration variable used by class TextLogger.

CONSOLE_LIGHT_COLORS 

Configuration variable used by colorful specializations of class TextLogger.

CODEPAGE 

Configuration variable used by class WindowsConsoleLogger.

Definition at line 38 of file aloxmodule.hpp.

◆ 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 run-time, 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 Domain's setting is Off.

Off 

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

Definition at line 83 of file alox/alox.hpp.