65 Lox(
const NString& name,
bool doRegister =
true );
212 Priority priority = Priority::Standard ) {
214 trimReplacement, reach, priority );
232 bool allowAutoRule =
true ) {
347 Priority priority = Priority::Standard )
365 Priority priority = Priority::Standard )
380 Priority priority=Priority::Standard)
392 Priority priority=Priority::Standard)
659 const NString& loggerName =
nullptr )
662 #if defined (__GLIBCXX__) || defined(_LIBCPP_VERSION) || defined(__APPLE__)
677 #if defined( _MSC_VER )
871 template <
typename... BoxedObjects>
888 template <
typename... BoxedObjects>
906 template <
typename... BoxedObjects>
907 void Info( BoxedObjects&&... logables )
924 template <
typename... BoxedObjects>
942 template <
typename... BoxedObjects>
943 void Error( BoxedObjects&&... logables )
962 template <
typename... BoxedObjects>
963 void Assert(
bool condition, BoxedObjects&&... logables ) {
981 template <
typename... BoxedObjects>
983 BoxedObjects&&... logables ) {
1008 template <
typename... BoxedObjects>
1009 void If(
bool condition,
Verbosity verbosity, BoxedObjects&&... logables ) {
1079 const Box& logables,
1081 Scope scope= Scope::Global,
1171 Scope scope= Scope::Global ,
1230 const String& group,
int quantity= 1 ) {
1279 #if ALIB_DEBUG_MEMORY
This class acts as a container for Loggers and provides a convenient interface to logging.
void Once(Verbosity verbosity, const Box &logables, const String &group, Scope scope, int quantity=1)
void SetPrefix(const Box &prefix, const NString &domain=nullptr, lang::Inclusion otherPLs=lang::Inclusion::Include)
Box Retrieve(Scope scope=Scope::Global)
Verbosity GetVerbosity(const NString &domain=NULL_NSTRING, NAString *resultDomain=nullptr)
void SetVerbosityExport(const NString &loggerName, bool value, Priority priority=Priority::Standard)
detail::Logger * GetLogger(const NString &loggerName)
void EntryDetectDomain(Verbosity verbosity, BoxedObjects &&... logables)
void Once(Verbosity verbosity, const Box &logables, Scope scope, int quantity=1)
void Entry(const NString &domain, Verbosity verbosity)
void SetVerbosity(detail::Logger *logger, Verbosity verbosity, const NString &domain="/", Priority priority=Priority::Standard)
integer & GetLogCounter()
void Verbose(BoxedObjects &&... logables)
void MapThreadName(const String &threadName, threads::ThreadID id=0)
Lox(const NString &name, bool doRegister=true)
void Once(const Box &logables, Scope scope, int quantity=1)
void ClearSourcePathTrimRules(lang::Reach reach=lang::Reach::Global, bool allowAutoRule=true)
void Once(const NString &domain, Verbosity verbosity, const Box &logables, Scope scope=Scope::Global, int quantity=1)
Box Retrieve(const NString &key, Scope scope=Scope::Global)
void SetDomainSubstitutionRule(const NString &domainPath, const NString &replacement)
void Once(const Box &logables, const String &group, Scope scope, int quantity=1)
void RemoveThreadDomain(const NString &scopeDomain, Scope scope, threads::Thread *thread=nullptr)
void Error(BoxedObjects &&... logables)
void If(bool condition, const NString &domain, Verbosity verbosity, BoxedObjects &&... logables)
detail::LoxImpl * impl
The implementation.
static textlogger::TextLogger * CreateConsoleLogger(const NString &name=nullptr)
static constexpr NString InternalDomains
void If(bool condition, Verbosity verbosity, BoxedObjects &&... logables)
void Once(Verbosity verbosity, const Box &logables, const String &group, int quantity=1)
void SetDomain(const NString &scopeDomain, Scope scope, threads::Thread *thread)
void Acquire(const lang::CallerInfo &ci)
void Warning(BoxedObjects &&... logables)
void Once(const Box &logables, const String &group, int quantity=1)
void Store(const Box &data, const NString &key, Scope scope=Scope::Global)
void SetSourcePathTrimRule(const NCString &path, lang::Inclusion includeString=lang::Inclusion::Exclude, int trimOffset=0, lang::Case sensitivity=lang::Case::Ignore, const NString &trimReplacement=NULL_NSTRING, lang::Reach reach=lang::Reach::Global, Priority priority=Priority::Standard)
void SetStartTime(const FILETIME &startTime, const NString &loggerName=nullptr)
const NString & GetName()
void SetPrefix(const Box &prefix, Scope scope)
void Info(BoxedObjects &&... logables)
void GetState(NAString &buf, StateInfo flags=StateInfo::All)
void Once(const Box &logables, int quantity=1)
int IsActive(Verbosity verbosity, const NString &domain=NULL_NSTRING, NAString *resultDomain=nullptr)
static void Register(Lox *lox, lang::ContainerOp operation)
void SetDomain(const NString &scopeDomain, Scope scope)
detail::Logger * RemoveLogger(const NString &loggerName)
void SetStartTime(time_t startTime, const NString &loggerName=nullptr)
void SetVerbosityExport(detail::Logger *logger, bool value, Priority priority=Priority::Standard)
void SetVerbosity(const NString &loggerName, Verbosity verbosity, const NString &domain="/", Priority priority=Priority::Standard)
void State(const NString &domain, Verbosity verbosity, const String &headLine, StateInfo flags=StateInfo::All)
BoxesMA & GetLogableContainer()
void Assert(bool condition, BoxedObjects &&... logables)
void Once(const NString &domain, Verbosity verbosity, const Box &logables, const String &group, Scope scope=Scope::Global, int quantity=1)
void SetFileNameCacheCapacity(integer numberOfLists, integer entriesPerList)
MonoAllocator & DbgGetMonoAllocator()
void Store(const Box &data, Scope scope=Scope::Global)
static Lox * Get(const NString &name, lang::CreateIfNotExists create=lang::CreateIfNotExists::No)
void Once(Verbosity verbosity, const Box &logables, int quantity=1)
void SetStartTime(Ticks startTime=time::Ticks(), const NString &loggerName=nullptr)
void SetPrefix(const Box &prefix, Scope scope, threads::Thread *thread)
bool RemoveLogger(detail::Logger *logger)
#define ALIB_ENUMS_MAKE_BITWISE(TEnum)
Reach
Denotes the reach of something.
@ Global
Denotes global reach.
ContainerOp
Denotes standard container operations.
CreateIfNotExists
Denotes whether something should be created if it does not exist.
Case
Denotes upper and lower case character treatment.
Inclusion
Denotes how members of a set something should be taken into account.
@ Exclude
Chooses exclusion.
@ Include
Chooses inclusion.
void shutdownLoxes()
Internal lox management.
integer ThreadID
The ALib thread identifier type.
monomem::TMonoAllocator< lang::HeapAllocator > MonoAllocator
strings::TString< nchar > NString
Type alias in namespace #"%alib".
constexpr NString NULL_NSTRING
A nulled string of the narrow character type.
variables::Priority Priority
Type alias in namespace #"%alib".
strings::TCString< nchar > NCString
Type alias in namespace #"%alib".
strings::TAString< nchar, lang::HeapAllocator > NAString
Type alias in namespace #"%alib".
lang::integer integer
Type alias in namespace #"%alib".
lox::Lox Lox
Type alias in namespace #"%alib".
boxing::Box Box
Type alias in namespace #"%alib".
strings::TString< character > String
Type alias in namespace #"%alib".
boxing::TBoxes< MonoAllocator > BoxesMA
Type alias in namespace #"%alib".
time::Ticks Ticks
Type alias in namespace #"%alib".
static BoxesMA & GetLogableContainer(LoxImpl *impl)
static const NString & GetName(LoxImpl *impl)
static void SetFileNameCacheCapacity(LoxImpl *impl, integer numberOfLists, integer entriesPerList)
static void SetStartTime(LoxImpl *impl, Ticks startTime, const NString &loggerName)
static integer & GetLogCounter(LoxImpl *impl)
static void store(LoxImpl *impl, const Box &data, const NString &pKey, Scope scope)
static void IncreaseLogCounter(LoxImpl *impl)
static void RemoveThreadDomain(LoxImpl *impl, const NString &scopeDomain, Scope scope, threads::Thread *thread)
static bool RemoveLogger(LoxImpl *impl, detail::Logger *logger)
static void SetVerbosity(LoxImpl *impl, detail::Logger *logger, Verbosity verbosity, const NString &domain, Priority priority)
static void SetDomainSubstitutionRule(LoxImpl *impl, const NString &domainPath, const NString &replacement)
static void SetPrefix(LoxImpl *impl, const Box &prefix, const NString &domain, lang::Inclusion otherPLs)
static void Release(LoxImpl *impl)
static void setPrefix(LoxImpl *impl, const Box &prefix, Scope scope, threads::Thread *thread)
static void SetVerbosityExport(LoxImpl *impl, detail::Logger *logger, bool value, Priority priority=Priority::Standard)
static void entryDetectDomainImpl(LoxImpl *impl, Verbosity verbosity)
static void once(LoxImpl *impl, const NString &domain, Verbosity verbosity, const Box &logables, const String &pGroup, Scope scope, int quantity)
static void SetSourcePathTrimRule(LoxImpl *impl, const NCString &path, lang::Inclusion includeString, int trimOffset, lang::Case sensitivity, const NString &trimReplacement, lang::Reach reach, Priority priority)
static void Entry(LoxImpl *impl, const NString &domain, Verbosity verbosity)
static void Acquire(LoxImpl *impl, const lang::CallerInfo &ci)
static int IsActive(LoxImpl *impl, Verbosity verbosity, const NString &domain, NAString *resultDomain)
static void GetState(LoxImpl *impl, NAString &buf, StateInfo flags)
static MonoAllocator & DbgGetMonoAllocator(LoxImpl *impl)
static Box retrieve(LoxImpl *impl, const NString &pKey, Scope scope)
static void setDomain(LoxImpl *impl, const NString &scopeDomain, Scope scope, bool removeNTRSD, threads::Thread *thread)
static detail::Logger * GetLogger(LoxImpl *impl, const NString &loggerName)
static void State(LoxImpl *impl, const NString &domain, Verbosity verbosity, const String &headLine, StateInfo flags)
static Verbosity GetVerbosity(LoxImpl *impl, const NString &domain, NAString *resultDomain)
static void MapThreadName(LoxImpl *impl, const String &threadName, threads::ThreadID id)