ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
Public Static Methods | List of all members
LogTools Class Reference

#include <logtools.hpp>

Class Description


Simple class with static tool functions. Currently the only functionality is logging objects of type Exception.

Definition at line 30 of file logtools.hpp.

Public Static Methods

static ALIB_API void Exception (Lox &lox, const results::Exception &e, Verbosity verbosity=Verbosity::Error, const NString &domainPrefix="/ERR", const String &logPrefix=A_CHAR(" "))
 

Member Function Documentation

◆ Exception()

void Exception ( Lox lox,
const results::Exception e,
Verbosity  verbosity = Verbosity::Error,
const NString domainPrefix = "/ERR",
const String logPrefix = A_CHAR("  ") 
)
static

Logs an aworx::Exception. If available, the correct source information is used for each entry.

Parameter domainPrefix and logPrefix are both set on outer thread scope (using SetDomain( domainPrefix, Scope::ThreadOuter ) and SetPrefix( logPrefix, Scope::ThreadOuter ). The reason for this approach is that it may occur that other prefixes or scope domains are set set on source scope for the source files and methods found in the exception entry's source code information. This is especially important to understand in respect to the log domain: With the default value of parameter domainPrefix being "/ERR", all source related domains will appear as a sub-domain of "/ERR" when the exception is logged using this tool function.

Parameters
loxThe lox to log into.
eThe exception to log.
verbosityThe verbosity of the log output.
Defaults to Verbosity::Error.
domainPrefixThe domain to log into. If NullString() , no domain is set and the default domain is used instead.
Defaults to "/ERR".
logPrefixA log prefix string. If NullString() , no prefix is set
Defaults to " " (two spaces).

Definition at line 26 of file logtools.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: