This header-file is part of the ALib C++ Framework.
© 2013-2025 A-Worx GmbH, Germany. Published under Boost Software License.
Definition in file alox.prepro.hpp.
#include "alib/alib.inl"Go to the source code of this file.
Macros | |
| #define | LOG_ACQUIRE { alib::lox::Lox& _log= LOG_LOX; _log.Acquire( LOG_CI ); |
| #define | Log_AddDebugLogger() |
| #define | Log_Assert(...) |
| #define | LOG_CI ALIB_CALLER |
| #define | Log_ClearSourcePathTrimRules(...) |
| #define | Log_Entry(...) |
| #define | Log_Error(...) |
| #define | Log_Exception(...) |
| #define | Log_GetLogger(identifier, name) |
| #define | Log_GetVerbosity(result, ...) |
| #define | Log_If(...) |
| #define | Log_Info(...) |
| #define | Log_IsActive(result, ...) |
| #define | Log_LogState(...) |
| #define | LOG_LOX (*alib::lox::Log::Get()) |
| #define | Log_MapThreadName(...) |
| #define | Log_Once(...) |
| #define | Log_Prune(...) |
| #define | LOG_RELEASE _log.Release(); } |
| #define | Log_RemoveDebugLogger() |
| #define | Log_RemoveLogger(logger) |
| #define | Log_RemoveThreadDomain(...) |
| #define | Log_Retrieve(data, ...) |
| #define | Log_SetDomain(...) |
| #define | Log_SetDomainSubstitutionRule(...) |
| #define | Log_SetPrefix(...) |
| #define | Log_SetSourcePathTrimRule(...) |
| #define | Log_SetStartTime(...) |
| #define | Log_SetVerbosity(...) |
| #define | Log_Store(...) |
| #define | Log_Verbose(...) |
| #define | Log_Warning(...) |
| #define | LOX_ACQUIRE { alib::lox::Lox& _lox= LOX_LOX; _lox.Acquire( LOX_CI ); |
| #define | Lox_Assert(...) |
| #define | LOX_CI ALIB_CALLER |
| #define | Lox_ClearSourcePathTrimRules(...) |
| #define | Lox_Entry(...) |
| #define | Lox_Error(...) |
| #define | Lox_Exception(...) |
| #define | Lox_GetLogger(identifier, name) |
| #define | Lox_GetVerbosity(result, ...) |
| #define | Lox_If(...) |
| #define | Lox_Info(...) |
| #define | Lox_IsActive(result, ...) |
| #define | Lox_LogState(...) |
| #define | LOX_LOX |
| #define | Lox_MapThreadName(...) |
| #define | Lox_Once(...) |
| #define | Lox_Prune(...) |
| #define | LOX_RELEASE _lox.Release(); } |
| #define | Lox_RemoveLogger(logger) |
| #define | Lox_RemoveThreadDomain(...) |
| #define | Lox_Retrieve(data, ...) |
| #define | Lox_SetDomain(...) |
| #define | Lox_SetDomainSubstitutionRule(...) |
| #define | Lox_SetPrefix(...) |
| #define | Lox_SetSourcePathTrimRule(...) |
| #define | Lox_SetStartTime(...) |
| #define | Lox_SetVerbosity(...) |
| #define | Lox_Store(...) |
| #define | Lox_Verbose(...) |
| #define | Lox_Warning(...) |
| #define LOG_ACQUIRE { alib::lox::Lox& _log= LOG_LOX; _log.Acquire( LOG_CI ); |
Macro that is placed at the beginning of almost all debug logging macros. Provides scope information (provided that ALOX_DBG_LOG_CI is set) to the lox and places the debug lox instance access code using LOG_LOX.
Definition at line 69 of file alox.prepro.hpp.
| #define Log_AddDebugLogger | ( | ) |
Invokes Log::AddDebugLogger to create, add and configure a default debug logger suitable for the platform and toolset.
| ... | The parameters to pass. |
Definition at line 83 of file alox.prepro.hpp.
| #define Log_Assert | ( | ... | ) |
Invokes Lox::Assert on the debug-singleton of the Lox-instance defined by the macro LOG_LOX.
| ... | The parameters to pass. |
Definition at line 99 of file alox.prepro.hpp.
| #define LOG_CI ALIB_CALLER |
Dependent on ALOX_DBG_LOG_CI, this macro provides comma delimited source information (sourcefile, line number, function name) or corresponding null values.
Definition at line 50 of file alox.prepro.hpp.
| #define Log_ClearSourcePathTrimRules | ( | ... | ) |
Invokes Lox::ClearSourcePathTrimRules on the debug-singleton of the Lox-instance
defined in the macro LOG_LOX.
| ... | The parameters to pass. |
Definition at line 82 of file alox.prepro.hpp.
| #define Log_Entry | ( | ... | ) |
Invokes Lox::Entry on the debug-singleton of the Lox-instance defined by the macro LOG_LOX.
| ... | The parameters to pass. |
Definition at line 102 of file alox.prepro.hpp.
| #define Log_Error | ( | ... | ) |
Invokes Lox::Error on the debug-singleton of the Lox-instance defined by the macro LOG_LOX.
| ... | The parameters to pass. |
Definition at line 98 of file alox.prepro.hpp.
| #define Log_Exception | ( | ... | ) |
Invokes Exception providing the debug-singleton of the Lox-instance defined by the macro LOG_LOX.
| ... | The parameters to pass. |
Definition at line 108 of file alox.prepro.hpp.
| #define Log_GetLogger | ( | identifier, | |
| name ) |
Invokes Lox::GetLogger on the debug-singleton of the Lox-instance defined by the macro LOG_LOX.
| identifier | The identifier name of the variable that receives the pointer to the logger. |
| name | The name of the logger to retrieve. |
Definition at line 85 of file alox.prepro.hpp.
| #define Log_GetVerbosity | ( | result, | |
| ... ) |
Invokes Lox::GetVerbosity on the object of type Lox defined by the macro LOG_LOX. The result value is assigned to given variable result
| result | The name of a variable of type Verbosity int that the return value of GetVerbosity() is assigned to. |
| ... | The parameters to pass. |
Definition at line 107 of file alox.prepro.hpp.
| #define Log_If | ( | ... | ) |
Invokes Lox::If(bool, Verbosity, BoxedObjects&& ...) (or one of its overloads) on the debug-singleton of the Lox-instance defined by the macro LOG_LOX.
| ... | The parameters to pass. |
Definition at line 100 of file alox.prepro.hpp.
| #define Log_Info | ( | ... | ) |
Invokes Lox::Info on the debug-singleton of the Lox-instance defined by the macro LOG_LOX.
| ... | The parameters to pass. |
Definition at line 96 of file alox.prepro.hpp.
| #define Log_IsActive | ( | result, | |
| ... ) |
Invokes Lox::IsActive on the object of type Lox defined by the macro LOG_LOX. The result value is assigned to given variable result
| result | The name of a variable of type int that the return value of IsActive() is assigned to. |
| ... | The parameters to pass. |
Definition at line 106 of file alox.prepro.hpp.
| #define Log_LogState | ( | ... | ) |
Invokes Lox::State on the debug-singleton of the Lox-instance defined by the macro LOG_LOX.
| ... | The parameters to pass. |
Definition at line 94 of file alox.prepro.hpp.
| #define LOG_LOX (*alib::lox::Log::Get()) |
The Lox instance used by all debug logging macros. This can be overwritten (prior or after including alox.hpp) to allow different instances of class Lox for debug logging within different source entities. However, other ways to structure log output and to separate log information into different streams exists in ALox and overwriting this macro is not recommended for standard use cases.
Note: The definition must provide a reference (not a pointer) to the Lox object.
Definition at line 45 of file alox.prepro.hpp.
| #define Log_MapThreadName | ( | ... | ) |
Invokes Lox::MapThreadName on the debug-singleton of the Lox-instance defined by the macro LOG_LOX.
| ... | The parameters to pass. |
Definition at line 93 of file alox.prepro.hpp.
| #define Log_Once | ( | ... | ) |
Invokes Lox::Once(Verbosity, const Box&, int) (or one of its overloads) on the debug-singleton of the Lox-instance defined by the macro LOG_LOX.
| ... | The parameters to pass. |
Definition at line 101 of file alox.prepro.hpp.
| #define Log_Prune | ( | ... | ) |
This very simple macro is used for pruning debug Log Statements. While it is used as a building block of all other macros for debug logging, for code entities using ALox, it provides an easy way to prune code lines that get inserted purely to support logging, e.g., to create ALox loggers or to prepare more complex log output. (The alternative way is to enclose such code within #ifdef ALOX_DBG_LOG / #endif preprocessor lines.
Depends on ALOX_DBG_LOG. If this is set, the macro just copies the code provided, else it does not copy it, hence removes the code.
Definition at line 76 of file alox.prepro.hpp.
| #define LOG_RELEASE _log.Release(); } |
Macro that is placed at the end of almost all debug logging macros. Releases the lox which was acquired when passing scope information (in macro LOG_ACQUIRE.).
Definition at line 70 of file alox.prepro.hpp.
| #define Log_RemoveDebugLogger | ( | ) |
Invokes Log::RemoveDebugLogger to remove and delete a debug logger created by Log::AddDebugLogger.
| ... | The parameters to pass. |
Definition at line 84 of file alox.prepro.hpp.
| #define Log_RemoveLogger | ( | logger | ) |
Invokes Lox::RemoveLogger(const NString&) (or its overload) on the debug-singleton of the Lox-instance defined by the macro LOG_LOX.
| logger | Either the name of or a pointer to the logger to remove. |
Definition at line 87 of file alox.prepro.hpp.
| #define Log_RemoveThreadDomain | ( | ... | ) |
Invokes Lox::RemoveThreadDomain on the debug-singleton of the Lox-instance defined by the macro LOG_LOX.
| ... | The parameters to pass. |
Definition at line 89 of file alox.prepro.hpp.
| #define Log_Retrieve | ( | data, | |
| ... ) |
Invokes Lox::Retrieve(Scope) (or its overload) on the debug-singleton of the Lox-instance defined by the macro LOG_LOX.
| data | The identifier name of the Box object to take the retrieved data. |
| ... | The parameters to pass. |
Definition at line 105 of file alox.prepro.hpp.
| #define Log_SetDomain | ( | ... | ) |
Invokes Lox::SetDomain(const NString&, Scope) (or its overload) on the debug-singleton of the Lox-instance defined by the macro LOG_LOX.
| ... | The parameters to pass. |
Definition at line 88 of file alox.prepro.hpp.
| #define Log_SetDomainSubstitutionRule | ( | ... | ) |
Invokes Lox::SetDomainSubstitutionRule on the debug-singleton of the Lox-instance
defined in the macro LOG_LOX.
| ... | The parameters to pass. |
Definition at line 90 of file alox.prepro.hpp.
| #define Log_SetPrefix | ( | ... | ) |
Invokes Lox::SetPrefix(const Box&, Scope) (or one of its overloads) on the debug-singleton of the Lox-instance defined by the macro LOG_LOX.
| ... | The parameters to pass. |
Definition at line 103 of file alox.prepro.hpp.
| #define Log_SetSourcePathTrimRule | ( | ... | ) |
Invokes Lox::SetSourcePathTrimRule on the debug-singleton of the Lox-instance
defined in the macro LOG_LOX.
| ... | The parameters to pass. |
Definition at line 81 of file alox.prepro.hpp.
| #define Log_SetStartTime | ( | ... | ) |
Invokes Lox::SetStartTime(Ticks, const NString&) (or one of its overloads) on the debug-singleton of the Lox-instance defined by the macro LOG_LOX.
| ... | The parameters to pass. |
Definition at line 92 of file alox.prepro.hpp.
| #define Log_SetVerbosity | ( | ... | ) |
Invokes one of the overloaded methods Lox::SetVerbosity (or one of its overloads) on the debug-singleton of the Lox-instance defined in macro LOG_LOX.
| ... | The parameters to pass. |
Definition at line 91 of file alox.prepro.hpp.
| #define Log_Store | ( | ... | ) |
Invokes Lox::Store(const Box&, Scope) or an overloaded version on the debug-singleton of the Lox-instance defined by the macro LOG_LOX.
| ... | The parameters to pass. |
Definition at line 104 of file alox.prepro.hpp.
| #define Log_Verbose | ( | ... | ) |
Invokes Lox::Verbose on the debug-singleton of the Lox-instance defined by the macro LOG_LOX.
| ... | The parameters to pass. |
Definition at line 95 of file alox.prepro.hpp.
| #define Log_Warning | ( | ... | ) |
Invokes Lox::Warning on the debug-singleton of the Lox-instance defined by the macro LOG_LOX.
| ... | The parameters to pass. |
Definition at line 97 of file alox.prepro.hpp.
| #define LOX_ACQUIRE { alib::lox::Lox& _lox= LOX_LOX; _lox.Acquire( LOX_CI ); |
Macro that is placed at the beginning of almost all release logging macros. Provides scope information (provided that ALOX_REL_LOG_CI is set) to the lox and places the release lox instance access code using LOX_LOX.
Definition at line 71 of file alox.prepro.hpp.
| #define Lox_Assert | ( | ... | ) |
Invokes Lox::Assert on the object of type Lox defined in macro LOX_LOX.
| ... | The parameters to pass. |
Definition at line 136 of file alox.prepro.hpp.
| #define LOX_CI ALIB_CALLER |
Dependent on ALOX_REL_LOG_CI, this macro provides comma delimited source information (sourcefile, line number, function name) or corresponding null values.
Definition at line 60 of file alox.prepro.hpp.
| #define Lox_ClearSourcePathTrimRules | ( | ... | ) |
Invokes Lox::ClearSourcePathTrimRules on the object of type Lox defined in macro LOX_LOX.
| ... | The parameters to pass. |
Definition at line 122 of file alox.prepro.hpp.
| #define Lox_Entry | ( | ... | ) |
Invokes Lox::Entry(const NString&, Verbosity) (or its overload) on the object of type Lox defined by the macro LOX_LOX.
| ... | The parameters to pass. |
Definition at line 139 of file alox.prepro.hpp.
| #define Lox_Error | ( | ... | ) |
Invokes Lox::Error on the object of type Lox defined in macro LOX_LOX.
| ... | The parameters to pass. |
Definition at line 135 of file alox.prepro.hpp.
| #define Lox_Exception | ( | ... | ) |
Invokes Exception providing the object of type Lox defined in macro LOX_LOX.
| ... | The parameters to pass. |
Definition at line 145 of file alox.prepro.hpp.
| #define Lox_GetLogger | ( | identifier, | |
| name ) |
Invokes Lox::GetLogger on the object of type Lox defined in macro LOX_LOX.
| identifier | The identifier name of the variable that receives the pointer to the logger. |
| name | The name of the logger to retrieve. |
Definition at line 123 of file alox.prepro.hpp.
| #define Lox_GetVerbosity | ( | result, | |
| ... ) |
Invokes Lox::GetVerbosity on the object of type Lox defined in macro LOX_LOX. The result value is assigned to given variable result
| result | The name of a variable of type Verbosity that the return value of GetVerbosity() is assigned to. |
| ... | The parameters to pass. |
Definition at line 144 of file alox.prepro.hpp.
| #define Lox_If | ( | ... | ) |
Invokes Lox::If(bool, Verbosity, BoxedObjects&& ...) (or its overload) on the object of type Lox defined in macro LOX_LOX.
| ... | The parameters to pass. |
Definition at line 137 of file alox.prepro.hpp.
| #define Lox_Info | ( | ... | ) |
Invokes Lox::Info on the object of type Lox defined in macro LOX_LOX.
| ... | The parameters to pass. |
Definition at line 133 of file alox.prepro.hpp.
| #define Lox_IsActive | ( | result, | |
| ... ) |
Invokes Lox::IsActive on the object of type Lox defined in macro LOX_LOX. The result value is assigned to given variable result
| result | The name of a variable of type int that the return value of IsActive() is assigned to. |
| ... | The parameters to pass. |
Definition at line 143 of file alox.prepro.hpp.
| #define Lox_LogState | ( | ... | ) |
Invokes Lox::State on the object of type Lox defined in macro LOX_LOX.
| ... | The parameters to pass. |
Definition at line 131 of file alox.prepro.hpp.
| #define LOX_LOX |
The Lox instance that is used by all release logging macros. This has to be set (prior or after including alox.hpp) to provide access to a, dedicated instance of class Lox created for release logging within software.
It is of course allowed to use different instances within different source entities. However, other ways to structure log output and separate log streams exist in ALox and should be evaluated before introducing different instances of class Lox.
Note: The definition must provide a reference (not a pointer) to the Lox object.
Definition at line 113 of file alox.prepro.hpp.
| #define Lox_MapThreadName | ( | ... | ) |
Invokes Lox::MapThreadName on the object of type Lox defined in macro LOX_LOX.
| ... | The parameters to pass. |
Definition at line 130 of file alox.prepro.hpp.
| #define Lox_Once | ( | ... | ) |
Invokes Lox::Once(const Box&, int) (or one of its overloads) on the object of type Lox defined by the macro LOX_LOX.
| ... | The parameters to pass. |
Definition at line 138 of file alox.prepro.hpp.
| #define Lox_Prune | ( | ... | ) |
This very simple macro is used for pruning release Log Statements at the moment release logging gets disabled (what in standard release scenarios is not done).
While it is used as a building block of all other macros for release logging, for code entities using ALox, it provides an easy way to prune code lines that get inserted purely to support logging, e.g., to create ALox loggers or to prepare more complex log output. (The alternative way is to enclose such code within #ifdef ALOX_REL_LOG / #endif preprocessor lines.
Depends on ALOX_REL_LOG. If this is set, the macro just copies the code provided, else it does not copy it, hence removes the code.
| ... | The code to prune. |
Definition at line 116 of file alox.prepro.hpp.
| #define LOX_RELEASE _lox.Release(); } |
Macro that is placed at the end of almost all release logging macros. Releases the lox which was acquired when passing scope information (in macro LOG_ACQUIRE.).
Definition at line 72 of file alox.prepro.hpp.
| #define Lox_RemoveLogger | ( | logger | ) |
Invokes Lox::RemoveLogger(const NString&) (or its overload) on the object of type Lox defined in macro LOX_LOX.
| logger | Either the name of or a pointer to the logger to remove. |
Definition at line 124 of file alox.prepro.hpp.
| #define Lox_RemoveThreadDomain | ( | ... | ) |
Invokes Lox::RemoveThreadDomain on the object of type Lox defined in macro LOX_LOX.
| ... | The parameters to pass. |
Definition at line 126 of file alox.prepro.hpp.
| #define Lox_Retrieve | ( | data, | |
| ... ) |
Invokes Lox::Retrieve(Scope) (or its overload) on the object of type Lox defined in macro LOX_LOX.
| data | The identifier name of the Box object to take the retrieved data. |
| ... | The parameters to pass. |
Definition at line 141 of file alox.prepro.hpp.
| #define Lox_SetDomain | ( | ... | ) |
Invokes Lox::SetDomain(const NString&, Scope) (or its overload) on the object of type Lox defined in macro LOX_LOX.
If Scope Domains based on source-related scopes should be supported in release logging, the ALib Build as well as the software entity have to be compiled with the configuration macro ALOX_REL_LOG_CI. Note that one effect of setting this macro is, that information on source code paths and file names, as well as method names make their way into the release executable. This may not be wanted.
| ... | The parameters to pass. |
Definition at line 125 of file alox.prepro.hpp.
| #define Lox_SetDomainSubstitutionRule | ( | ... | ) |
Invokes Lox::SetDomainSubstitutionRule on the object of type Lox defined in macro LOX_LOX.
| ... | The parameters to pass. |
Definition at line 127 of file alox.prepro.hpp.
| #define Lox_SetPrefix | ( | ... | ) |
Invokes Lox::SetPrefix(const Box&, Scope) (or one of its overloads) on the object of type Lox defined in macro LOX_LOX.
| ... | The parameters to pass. |
Definition at line 142 of file alox.prepro.hpp.
| #define Lox_SetSourcePathTrimRule | ( | ... | ) |
Invokes Lox::SetSourcePathTrimRule on the object of type Lox defined in macro LOX_LOX.
| ... | The parameters to pass. |
Definition at line 121 of file alox.prepro.hpp.
| #define Lox_SetStartTime | ( | ... | ) |
Invokes Lox::SetStartTime(Ticks, const NString&) (or one of its overloads) on the object of type Lox defined in macro LOX_LOX.
| ... | The parameters to pass. |
Definition at line 129 of file alox.prepro.hpp.
| #define Lox_SetVerbosity | ( | ... | ) |
Invokes one of the overloaded methods Lox::SetVerbosity (or its overload) on the object of type Lox defined by the macro LOX_LOX.
| ... | The parameters to pass. |
Definition at line 128 of file alox.prepro.hpp.
| #define Lox_Store | ( | ... | ) |
Invokes Lox::Store(const Box&, Scope) (or its overload) on the object of type Lox defined by the macro LOX_LOX.
| ... | The parameters to pass. |
Definition at line 140 of file alox.prepro.hpp.
| #define Lox_Verbose | ( | ... | ) |
Invokes Lox::Verbose on the object of type Lox defined in macro LOX_LOX.
| ... | The parameters to pass. |
Definition at line 132 of file alox.prepro.hpp.
| #define Lox_Warning | ( | ... | ) |
Invokes Lox::Warning on the object of type Lox defined in macro LOX_LOX.
| ... | The parameters to pass. |
Definition at line 134 of file alox.prepro.hpp.