8#ifndef HPP_ALIB_LOX_DETAIL_DOMAIN
9#define HPP_ALIB_LOX_DETAIL_DOMAIN 1
11#if !defined(HPP_ALIB_LOX_PROPPERINCLUDE)
12# error "ALib sources with ending '.inl' must not be included from outside."
51 if ( IsArrayOf<nchar>() ) new (this) Box(copy.Reset( Unbox<NString>() ));
52 else if ( IsArrayOf<wchar>() ) new (this) Box(copy.Reset( Unbox<WString>() ));
53 else if ( IsArrayOf<xchar>() ) new (this) Box(copy.Reset( Unbox<XString>() ));
164 while ( rootDomain->
Parent !=
nullptr )
165 rootDomain= rootDomain->
Parent;
188 return static_cast<int>(
Data.size()) - 1;
216 return static_cast<int>(
Data.size() );
227 for (
size_t i= 0; i <
Data.size() ; ++i )
240 ALIB_ASSERT_ERROR( no <
static_cast<int>(
Data.size()),
"ALOX",
"Internal error: Illegal Logger Number" )
252 for (
size_t i= 0; i <
Data.size() ; ++i )
254 return static_cast<int>( i );
265 for (
size_t i= 0; i <
Data.size() ; ++i )
267 return static_cast<int>( i );
291 return Data[size_t(loggerNo)].LoggerVerbosity;
301 return Data[size_t(loggerNo)].Priority;
312 return Data[size_t(loggerNo)].LogCallsPerDomain;
335 if( statement != Verbosity::Off
336 && ( ( domain == Verbosity::Error && statement == Verbosity::Error )
337 || ( domain == Verbosity::Warning && ( statement == Verbosity::Warning || statement == Verbosity::Error ) )
338 || ( domain == Verbosity::Info && statement != Verbosity::Verbose )
339 || domain == Verbosity::Verbose )
342 ++
Data[size_t(loggerNo)].LogCallsPerDomain;
409 target.Append(
static_cast<const Box&
>(src) ); )
ALIB_API bool IsNotNull() const
Verbosity GetVerbosity(int loggerNo)
bool ConfigurationAlreadyRead
Flag which is set when verbosity configuration data was read.
ALIB_API void removeLoggerRecursive(int loggerNo)
Domain * Parent
The parent domain. For root domains, this is nullptr.
int GetCount(int loggerNo)
ALIB_API Verbosity SetVerbosity(int loggerNo, Verbosity verbosity, Priority priority)
int GetLoggerNo(detail::Logger *logger)
int AddLogger(detail::Logger *logger)
void ToString(NAString &target)
NString FullPath
The full path of the domain (set in the constructor once) .
detail::Logger * GetLogger(int no)
bool IsActive(int loggerNo, Verbosity statement)
List< PoolAllocator, std::pair< PrefixLogable *, lang::Inclusion >, Recycling::None > PrefixLogables
Prefix Logables associated with this domain.
void RemoveLogger(int loggerNo)
StdVectorMono< LoggerData > Data
Priority GetPriority(int loggerNo)
ALIB_API void addLoggerRecursive(detail::Logger *logger)
Domain * findRecursive(NSubstring &domainPath, int maxCreate, bool *wasCreated)
int GetLoggerNo(const NString &loggerName)
NString Name
The name of the domain. For root domains, this is nulled.
detail::Logger * GetLogger(const NString &loggerName)
ALIB_API Domain(MonoAllocator &allocator, PoolAllocator &pool, const NString &name)
List< MonoAllocator, Domain, Recycling::None > SubDomains
A list of subdomains, sorted by name.
static constexpr nchar Separator()
ALIB_API Domain * Find(NSubstring domainPath, int maxCreate, bool *wasCreated)
Logger(const NString &name, const NString &typeName)
const NString & GetName() const
AStringPA copy
If set, it will be deleted.
PrefixLogable(PoolAllocator &pa, const Box &src)
bool Equals(const TString< TChar > &rhs) const
#define ALIB_STRINGS_APPENDABLE_TYPE_INLINE(TYPE, IMPL)
#define ALIB_ASSERT_ERROR(cond,...)
Inclusion
Denotes how members of a set something should be taken into account.
std::vector< T, SCAMono< T > > StdVectorMono
Type alias in namespace alib.
monomem::TMonoAllocator< lang::HeapAllocator > MonoAllocator
monomem::TPoolAllocator< MonoAllocator, ALIB_MONOMEM_POOLALLOCATOR_DEFAULT_ALIGNMENT > PoolAllocator
characters::nchar nchar
Type alias in namespace alib.
lang::integer integer
Type alias in namespace alib.
Internal class that holds data stored per Logger.
int LogCallsPerDomain
the number of log calls on this domain for this logger.
Verbosity LoggerVerbosity
The verbosity of the Logger for this domain.
LoggerData(detail::Logger *logger)
detail::Logger * Logger
The logger.