68 Lox(
const NString& name,
bool doRegister =
true );
216 Priority priority = Priority::Standard ) {
218 trimReplacement, reach, priority );
236 bool allowAutoRule =
true ) {
351 Priority priority = Priority::Standard )
372 Priority priority = Priority::Standard )
639 const NString& loggerName =
nullptr )
642 #if defined (__GLIBCXX__) || defined(_LIBCPP_VERSION) || defined(__APPLE__)
657 #if defined( _MSC_VER )
852 template <
typename... BoxedObjects>
870 template <
typename... BoxedObjects>
888 template <
typename... BoxedObjects>
889 void Info( BoxedObjects&&... logables )
906 template <
typename... BoxedObjects>
924 template <
typename... BoxedObjects>
925 void Error( BoxedObjects&&... logables )
944 template <
typename... BoxedObjects>
945 void Assert(
bool condition, BoxedObjects&&... logables ) {
963 template <
typename... BoxedObjects>
965 BoxedObjects&&... logables ) {
990 template <
typename... BoxedObjects>
991 void If(
bool condition,
Verbosity verbosity, BoxedObjects&&... logables ) {
1061 const Box& logables,
1063 Scope scope= Scope::Global,
1153 Scope scope= Scope::Global ,
1212 const String& group,
int quantity= 1 ) {
1239 #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)
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)
int IsActive(Verbosity verbosity, const NString &domain=NULL_NSTRING, NAString *resultDomain=nullptr)
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 int IsActive(LoxImpl *impl, Verbosity verbosity, const NString &domain, NAString *resultDomain)
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 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)