14#if !ALIB_SINGLE_THREADED
27 "Name \"GLOBAL\" not allowed for Lox instances" )
33 std::vector<SourcePathTrimRule>* trimInfoList;
34 for(
int trimInfoNo= 0; trimInfoNo < 2 ; ++trimInfoNo )
39 if ( trimInfoNo == 0 ) {
54 tokOuter.
Set(variable,
';',
true);
57 trimInfoList->emplace_back();
69 trimInfoList->pop_back();
97 if( resultPair.first ==
false )
98 resultPair.second.Construct(ci.
File);
99 scope.
Parsed = &*resultPair.second;
112 const NString& trimReplacement,
119 if ( trimOffset == 999999 ) {
131 std::vector<SourcePathTrimRule>* trimInfoList=
136 auto it= trimInfoList->begin();
137 while( it != trimInfoList->end() && priority < it->
Priority )
140 it= trimInfoList->emplace(it);
149 trimInfoList->erase( it );
182 for(
int trimInfoNo= 0; trimInfoNo < 2 ; ++trimInfoNo ) {
184 std::vector<SourcePathTrimRule>* trimInfoList=
189 for (
auto& ti : *trimInfoList ) {
218 Path currentDir(SystemFolders::Current);
#define IF_ALIB_THREADS(...)
#define ALIB_ASSERT(cond, domain)
#define ALIB_ASSERT_ERROR(cond, domain,...)
#define ALIB_LOCK_WITH(lock)
static std::vector< SourcePathTrimRule > GlobalSPTRs
List of trim definitions for portions of source paths to be ignored.
StdVectorMA< FrameRecord > callStack
A stack of scopes (allows recursive calls/nested logging).
static bool GlobalSPTRsReadFromConfig
Flag to determine if global rules have been read from config already.
ScopeInfo(const NString &name, MonoAllocator &allocator)
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
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.
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.
integer SearchAndReplace(TChar needle, TChar replacement, integer startIdx=0, integer endIdx=strings::MAX_LEN)
TAString & DeleteEnd(integer regionLength)
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)
void Set(const TString< TChar > &src, TChar delimiter, bool skipEmptyTokens=false)
TSubstring< TChar > Actual
TSubstring< TChar > & Next(lang::Whitespaces trimming=lang::Whitespaces::Trim, TChar newDelim='\0')
static Thread * GetMain()
Priority GetPriority() const
Variable & Declare(const String &name, const String &typeName, const String &defaultValue=NULL_STRING)
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 #"alxcvALOX_GLOBAL_SOURCE_PATH_TRIM_RULES".
@ SPTR_LOX
Denotes configuration variable #"alxcvALOX_LOXNAME_SOURCE_PATH_TRIM_RULES" used by class #"Lox".
variables::Variable CampVariable(camp::Camp &camp)
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".
variables::Variable Variable
Type alias in namespace #"%alib".
strings::util::TTokenizer< character > Tokenizer
Type alias in namespace #"%alib".
lox::ALoxCamp ALOX
The singleton instance of ALib Camp class #"ALoxCamp".
lang::integer integer
Type alias in namespace #"%alib".
system::Path Path
Type alias in namespace #"%alib".
constexpr PathCharType DIRECTORY_SEPARATOR
The standard path separator character. Defaults to '\' on Windows OS, '/' else.
characters::character character
Type alias in namespace #"%alib".
#define ALIB_STRINGS_FROM_NARROW( src, dest, bufSize)
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 #"ScopeInfo::parsedFileNameCache;2".
int origLine
Line number within the source file (given by the C++ preprocessor).
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.
#define ALIB_PATH_TO_NARROW( src, dest, bufSize)