8#if !defined(ALIB_C20_MODULES) || ((ALIB_C20_MODULES != 0) && (ALIB_C20_MODULES != 1))
9# error "Symbol ALIB_C20_MODULES has to be given to the compiler as either 0 or 1"
22 import ALib.Strings.Tokenizer;
24 import ALib.EnumRecords;
25 import ALib.EnumRecords.Bootstrap;
27 import ALib.Variables;
29 import ALib.Camp.Base;
58 if( domainPrefix.
IsNotNull() )
lox.SetDomain( domainPrefix, Scope::ThreadOuter );
59 if( logPrefix .IsNotNull() )
lox.SetPrefix( logPrefix , Scope::ThreadOuter );
60 for (
auto& entry : e ) {
61 formatter.FormatArgs( buf.
Reset(), entry );
63 lox.Acquire( entry.CI );
65 tknzr.
Set( buf,
'\n' );
68 auto& logables=
lox.GetLogableContainer();
70 logables.Add(
"{}{}: {!Q[]}", (entry.Type.Integral() >= 0 ?
'E' :
'I'),
71 entryNo, entry.Type );
73 logables.Add(
" {}" , tknzr.
Next() );
75 lox.Entry(
"", verbosity );
81 if( domainPrefix.
IsNotNull() )
lox.SetDomain(
nullptr, Scope::ThreadOuter );
82 if( logPrefix .IsNotNull() )
lox.SetPrefix(
nullptr, Scope::ThreadOuter );
87 lox.Error(
"Format exception caught while creating formatted output of another exception!\n"
88 "Format output generated so far: ", buf );
This class acts as a container for Loggers and provides a convenient interface to logging.
void DbgDisableBufferReplacementWarning()
constexpr bool IsNotNull() const
ALIB_DLL TSubstring< TChar > & Next(lang::Whitespaces trimming=lang::Whitespaces::Trim, TChar newDelim='\0')
void Set(const TString< TChar > &src, TChar delimiter, bool skipEmptyTokens=false)
TLocalString< TChar, 8 > TrimChars
#define ALIB_CALLER_NULLED
#define ALIB_LOCK_RECURSIVE_WITH(lock)
strings::util::TTokenizer< character > Tokenizer
Type alias in namespace alib.
strings::TString< nchar > NString
Type alias in namespace alib.
format::Formatter Formatter
Type alias in namespace alib.
LocalString< 1024 > String1K
Type alias name for TLocalString<character,1024>.
exceptions::Exception Exception
Type alias in namespace alib.
strings::TString< character > String
Type alias in namespace alib.