71 Lox(
const NString& name,
bool doRegister =
true );
242 Priority priority = Priority::Standard )
246 trimReplacement, reach, priority );
266 bool allowAutoRule =
true )
398 Priority priority = Priority::Standard )
423 Priority priority = Priority::Standard )
722 const NString& loggerName =
nullptr )
727 #if defined (__GLIBCXX__) || defined(_LIBCPP_VERSION) || defined(__APPLE__)
746 #if defined( _MSC_VER )
979 template <
typename... BoxedObjects>
999 template <
typename... BoxedObjects>
1019 template <
typename... BoxedObjects>
1020 void Info( BoxedObjects&&... logables )
1039 template <
typename... BoxedObjects>
1059 template <
typename... BoxedObjects>
1060 void Error( BoxedObjects&&... logables )
1081 template <
typename... BoxedObjects>
1082 void Assert(
bool condition, BoxedObjects&&... logables )
1104 template <
typename... BoxedObjects>
1134 template <
typename... BoxedObjects>
1135 void If(
bool condition,
Verbosity verbosity, BoxedObjects&&... logables )
1209 const Box& logables,
1211 Scope scope= Scope::Global,
1319 Scope scope= Scope::Global ,
1372 detail::LI::once(
impl,
nullptr, Verbosity::Info, logables,
nullptr, Scope::Global, quantity );
1391 const String& group,
int quantity= 1 )
1417 #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)
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)
ALIB_DLL ~Lox()
Destructs a lox.
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)
ALIB_DLL 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)
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)
int IsActive(Verbosity verbosity, const NString &domain=NULL_NSTRING)
void If(bool condition, const NString &domain, Verbosity verbosity, BoxedObjects &&... logables)
detail::LoxImpl * impl
The implementation.
static ALIB_DLL 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)
ALIB_DLL Box Retrieve(Scope scope=Scope::Global)
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)
static ALIB_DLL 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 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)
ALIB_DLL Box Retrieve(const NString &key, Scope scope=Scope::Global)
void SetFileNameCacheCapacity(integer numberOfLists, integer entriesPerList)
MonoAllocator & DbgGetMonoAllocator()
void Store(const Box &data, Scope scope=Scope::Global)
static ALIB_DLL 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.
constexpr NString NULL_NSTRING
A nulled string of the narrow character type.
lang::integer integer
Type alias in namespace alib.
strings::TString< nchar > NString
Type alias in namespace alib.
strings::TAString< nchar, lang::HeapAllocator > NAString
Type alias in namespace alib.
monomem::TMonoAllocator< lang::HeapAllocator > MonoAllocator
strings::TCString< nchar > NCString
Type alias in namespace alib.
alib::variables::Priority Priority
Type alias in namespace alib.
boxing::Box Box
Type alias in namespace alib.
lox::Lox Lox
Type alias in namespace alib.
boxing::TBoxes< MonoAllocator > BoxesMA
Type alias in namespace alib.
strings::TString< character > String
Type alias in namespace alib.
time::Ticks Ticks
Type alias in namespace alib.
static ALIB_DLL void SetFileNameCacheCapacity(LoxImpl *impl, integer numberOfLists, integer entriesPerList)
static ALIB_DLL void entryDetectDomainImpl(LoxImpl *impl, Verbosity verbosity)
static ALIB_DLL void MapThreadName(LoxImpl *impl, const String &threadName, threads::ThreadID id)
static ALIB_DLL void once(LoxImpl *impl, const NString &domain, Verbosity verbosity, const Box &logables, const String &pGroup, Scope scope, int quantity)
static ALIB_DLL const NString & GetName(LoxImpl *impl)
static ALIB_DLL void Release(LoxImpl *impl)
static ALIB_DLL void SetSourcePathTrimRule(LoxImpl *impl, const NCString &path, lang::Inclusion includeString, int trimOffset, lang::Case sensitivity, const NString &trimReplacement, lang::Reach reach, Priority priority)
static ALIB_DLL void GetState(LoxImpl *impl, NAString &buf, StateInfo flags)
static ALIB_DLL void IncreaseLogCounter(LoxImpl *impl)
static ALIB_DLL integer & GetLogCounter(LoxImpl *impl)
static ALIB_DLL BoxesMA & GetLogableContainer(LoxImpl *impl)
static ALIB_DLL void Acquire(LoxImpl *impl, const lang::CallerInfo &ci)
static ALIB_DLL void SetVerbosity(LoxImpl *impl, detail::Logger *logger, Verbosity verbosity, const NString &domain, Priority priority)
static ALIB_DLL void SetPrefix(LoxImpl *impl, const Box &prefix, const NString &domain, lang::Inclusion otherPLs)
static ALIB_DLL Box retrieve(LoxImpl *impl, const NString &pKey, Scope scope)
static ALIB_DLL void setPrefix(LoxImpl *impl, const Box &prefix, Scope scope, threads::Thread *thread)
static ALIB_DLL void store(LoxImpl *impl, const Box &data, const NString &pKey, Scope scope)
static ALIB_DLL bool RemoveLogger(LoxImpl *impl, detail::Logger *logger)
static ALIB_DLL void SetStartTime(LoxImpl *impl, Ticks startTime, const NString &loggerName)
static ALIB_DLL void setDomain(LoxImpl *impl, const NString &scopeDomain, Scope scope, bool removeNTRSD, threads::Thread *thread)
static ALIB_DLL void Entry(LoxImpl *impl, const NString &domain, Verbosity verbosity)
static ALIB_DLL void RemoveThreadDomain(LoxImpl *impl, const NString &scopeDomain, Scope scope, threads::Thread *thread)
static ALIB_DLL void State(LoxImpl *impl, const NString &domain, Verbosity verbosity, const String &headLine, StateInfo flags)
static ALIB_DLL int IsActive(LoxImpl *impl, Verbosity verbosity, const NString &domain)
static ALIB_DLL void SetDomainSubstitutionRule(LoxImpl *impl, const NString &domainPath, const NString &replacement)
static ALIB_DLL MonoAllocator & DbgGetMonoAllocator(LoxImpl *impl)
static ALIB_DLL detail::Logger * GetLogger(LoxImpl *impl, const NString &loggerName)