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"
64#if !ALIB_SINGLE_THREADED
77 "Name \"GLOBAL\" not allowed for Lox instances" )
83 std::vector<SourcePathTrimRule>* trimInfoList;
84 for(
int trimInfoNo= 0; trimInfoNo < 2 ; ++trimInfoNo )
89 if ( trimInfoNo == 0 )
108 tokOuter.
Set(variable,
';',
true);
112 trimInfoList->emplace_back();
125 trimInfoList->pop_back();
157 if( resultPair.first ==
false )
158 resultPair.second.Construct(ci.
File);
159 scope.
Parsed = &*resultPair.second;
172 const NString& trimReplacement,
180 if ( trimOffset == 999999 )
193 std::vector<SourcePathTrimRule>* trimInfoList=
198 auto it= trimInfoList->begin();
199 while( it != trimInfoList->end() && priority < it->
Priority )
202 it= trimInfoList->emplace(it);
212 trimInfoList->erase( it );
247 for(
int trimInfoNo= 0; trimInfoNo < 2 ; ++trimInfoNo )
250 std::vector<SourcePathTrimRule>* trimInfoList=
255 for (
auto& ti : *trimInfoList )
288 Path currentDir(SystemFolders::Current);
317 #pragma warning( pop )
static ALIB_DLL std::vector< SourcePathTrimRule > GlobalSPTRs
List of trim definitions for portions of source paths to be ignored.
static ALIB_DLL bool GlobalSPTRsReadFromConfig
Flag to determine if global rules have been read from config already.
ALIB_DLL ScopeInfo(const NString &name, MonoAllocator &allocator)
ALIB_DLL void SetSourcePathTrimRule(const NCString &path, lang::Inclusion includeString, int trimOffset, lang::Case sensitivity, const NString &trimReplacement, lang::Reach reach, Priority priority)
NString loxName
The name of the Lox we are attached to.
bool AutoDetectTrimableSourcePath
StdVectorMono< FrameRecord > callStack
A stack of scopes (allows recursive calls/nested logging).
ThreadDictionary threadDictionary
String threadName
The name of the thread that executed the log.
LRUCacheTable< MonoAllocator, ValueDescriptorPFN, std::hash< NString > > parsedFileNameCache
Least recently used cache of parsed file name.
Thread * thread
The thread passed with Set.
int callStackSize
The current depth of recursive invocations.
ALIB_DLL void Set(const lang::CallerInfo &ci)
std::vector< SourcePathTrimRule > LocalSPTRs
List of trim definitions for portions of source paths to be ignored.
std::thread::id threadNativeIDx
The C++ native ID.
TAString & DeleteEnd(integer regionLength)
ALIB_DLL integer SearchAndReplace(TChar needle, TChar replacement, integer startIdx=0, integer endIdx=strings::MAX_LEN)
TAString & ShortenTo(integer newLength)
TAString & _(const TAppendable &src)
constexpr integer Length() const
constexpr bool IsEmpty() const
TChar CharAtStart() const
integer IndexOf(TChar needle, integer startIdx=0) const
constexpr const TChar * Buffer() const
TString< TChar > Substring(integer regionStart, integer regionLength=MAX_LEN) const
bool StartsWith(const TString &needle) const
bool ConsumeInt(std::integral auto &result, TNumberFormat< TChar > *numberFormat=nullptr)
integer ConsumeChars(integer regionLength, TSubstring *target=nullptr)
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)
TSubstring< TChar > Actual
static ALIB_DLL Thread * GetMain()
Priority GetPriority() const
ALIB_DLL Variable & Declare(const String &name, const String &typeName, const String &defaultValue=NULL_STRING)
#define IF_ALIB_THREADS(...)
#define ALIB_ASSERT(cond, domain)
#define ALIB_PATH_TO_NARROW( src, dest, bufSize)
#define ALIB_ASSERT_ERROR(cond, domain,...)
#define ALIB_LOCK_WITH(lock)
#define ALIB_STRINGS_FROM_NARROW( src, dest, bufSize)
bool ParseEnumOrTypeBool(strings::TSubstring< TChar > &input, TEnum &result, TEnum falseValue, TEnum trueValue)
Reach
Denotes the reach of something.
@ Global
Denotes global reach.
@ Local
Denotes local reach.
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.
@ SPTR_GLOBAL
Denotes configuration variable ALOX/GLOBAL_SOURCE_PATH_TRIM_RULES.
@ SPTR_LOX
Denotes configuration variable ALOX/LOXNAME/SOURCE_PATH_TRIM_RULES used by class Lox.
constexpr PathCharType DIRECTORY_SEPARATOR
The standard path separator character. Defaults to '\' on Windows OS, '/' else.
variables::Variable CampVariable(camp::Camp &camp)
constexpr NString NULL_NSTRING
A nulled string of the narrow character type.
strings::util::TTokenizer< character > Tokenizer
Type alias in namespace alib.
variables::Variable Variable
Type alias in namespace alib.
lang::integer integer
Type alias in namespace alib.
strings::TString< nchar > NString
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.
lox::ALoxCamp ALOX
The singleton instance of ALib Camp class ALoxCamp.
characters::character character
Type alias in namespace alib.
const char * File
The name of the source file as given by compiler.
int Line
The line number within File.
Ticks timeStamp
Time of the call that created this record.
NCString origMethod
Function/method name (given by the C++ preprocessor)
ParsedFileName * Parsed
The entry from the parsedFileNameCache.
int origLine
Line number within the source file (given by the C++ preprocessor)
Information of a single source file. Stored in field parsedFileNameCache.
NCString origFile
Path and name of source file (given by the C++ preprocessor).
NString trimmedPathPrefix
NString trimmedPath
Trimmed path of source file (evaluated).
int TrimOffset
Additional offset of the trim position.
lang::Inclusion IncludeString
Denotes if Path itself should be included when trimmed.
variables::Priority Priority
The priority of the rule. Depends on origin: source code, config...)
bool IsPrefix
true if path was not starting with '*', when provided.
lang::Case Sensitivity
The sensitivity of the comparison when trimming.
NAString Path
The path string.
NAString TrimReplacement
Optional replacement string for trimmed paths.