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: | |
namespace | detail |
namespace | loggers |
Type Index: | |
class | ALox |
class | ALoxReportWriter |
class | ESC |
class | Log |
class | LogTools |
class | Lox |
Enumeration Index: | |
enum class | Scope { Global , ThreadOuter , Filename , Method , ThreadInner , Path } |
enum class | 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 class | 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 class | Verbosity { Verbose , Info , Warning , Error , Off } |
|
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 );
For more information on Scopes consult the ALib Module ALox - Programmer's 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 129 of file alox/alox.hpp.
|
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 |
|
strong |
Configuration variables uses by ALox.
Enumerator | |
---|---|
NO_IDE_LOGGER | Denotes configuration variable ALOX_NO_IDE_LOGGER used by Log::AddDebugLogger . |
CONSOLE_TYPE | Denotes configuration variable ALOX_CONSOLE_TYPE used by Lox::CreateConsoleLogger . |
VERBOSITY | Denotes configuration variable ALOX_LOXNAME_LOGGERNAME_VERBOSITY. |
SPTR_GLOBAL | Denotes configuration variable ALOX_GLOBAL_SOURCE_PATH_TRIM_RULES. |
SPTR_LOX | Denotes configuration variable ALOX_LOXNAME_SOURCE_PATH_TRIM_RULES used by class Lox . |
DOMAIN_SUBSTITUTION | Denotes configuration variable ALOX_LOXNAME_DOMAIN_SUBSTITUTION used by class Lox . |
PREFIXES | Denotes configuration variable ALOX_LOXNAME_PREFIXES used by class Lox . |
DUMP_STATE_ON_EXIT | Denotes configuration variable ALOX_LOXNAME_DUMP_STATE_ON_EXIT used by class Lox . |
AUTO_SIZES | Denotes configuration variable ALOX_LOGGERNAME_AUTO_SIZES used by class TextLogger . |
FORMAT | Denotes configuration variable ALOX_LOGGERNAME_FORMAT used by class TextLogger . |
FORMAT_DATE_TIME | Denotes configuration variable ALOX_LOGGERNAME_FORMAT_DATE_TIME used by class TextLogger . |
FORMAT_MULTILINE | Denotes configuration variable ALOX_LOGGERNAME_FORMAT_MULTILINE used by class TextLogger . |
FORMAT_TIME_DIFF | Denotes configuration variable ALOX_LOGGERNAME_FORMAT_TIME_DIFF used by class TextLogger . |
MAX_ELAPSED_TIME | Denotes configuration variable ALOX_LOGGERNAME_MAX_ELAPSED_TIME used by class TextLogger . |
REPLACEMENTS | Denotes configuration variable ALOX_LOGGERNAME_REPLACEMENTS used by class TextLogger . |
CONSOLE_LIGHT_COLORS | Denotes configuration variable ALOX_CONSOLE_LIGHT_COLORS used by colorful specializations of class TextLogger . |
CODEPAGE | Denotes configuration variable ALOX_CODE_PAGE used by class WindowsConsoleLogger . |
Definition at line 44 of file aloxmodule.hpp.
|
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
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. |
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 64 of file alox/alox.hpp.