ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
LogTools Class Reference

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.

#include <logtools.hpp>

Public Static Method Index:

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

Method Details:

◆ Exception()

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

Logs an alib::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: