29#if !ALIB_SINGLE_THREADED
74 #if !ALIB_SINGLE_THREADED
215 const NString& trimReplacement,
232 if( srcFile.fullPath.IsNull() ) {
235 srcFile.fullPath=
NString( srcFile.origFile.Buffer(), idx );
237 srcFile.fullPath=
"";
240 return srcFile.fullPath;
248 if( srcFile.trimmedPath.IsNull() )
251 target.
_( srcFile.trimmedPathPrefix )
252 .
_( srcFile.trimmedPath );
259 if( srcFile.name.IsNull() ) {
262 srcFile.name=
NString( srcFile.origFile.Buffer() + idx + 1,
263 srcFile.origFile.Length() - idx - 1 );
275 if( srcFile.nameWOExt.IsNull() ) {
277 integer lastDot= srcFile.nameWOExt.LastIndexOf(
'.' );
279 srcFile.nameWOExt=
NString( srcFile.nameWOExt.Buffer(), lastDot );
281 return srcFile.nameWOExt;
302#if !ALIB_SINGLE_THREADED
357 if( srcFile.origFilePathLength == -2 ) {
362 #if defined( _WIN32 )
363 if( srcFile.origFilePathLength == -1 )
364 srcFile.origFilePathLength= srcFile.origFile.LastIndexOf(
'/' );
367 return srcFile.origFilePathLength;
#define ALIB_ASSERT(cond, domain)
static std::vector< SourcePathTrimRule > GlobalSPTRs
List of trim definitions for portions of source paths to be ignored.
const NString GetFileNameWithoutExtension()
const NCString GetMethod()
const NCString & GetOrigFile()
const alib::String & GetThreadNameAndID(threads::ThreadID *id)
std::thread::id GetThreadNativeID()
StdVectorMA< FrameRecord > callStack
A stack of scopes (allows recursive calls/nested logging).
const NString GetLoxName()
void GetTrimmedPath(AString &target)
threads::ThreadID GetThreadID()
const NString GetFileName()
static bool GlobalSPTRsReadFromConfig
Flag to determine if global rules have been read from config already.
ScopeInfo(const NString &name, MonoAllocator &allocator)
const NString GetFullPath()
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
void SetFileNameCacheCapacity(integer numberOfLists, integer entriesPerList)
ThreadDictionary threadDictionary
void PopNestedScope()
Releases latest scope information.
HashMap< MonoAllocator, threads::ThreadID, String32 > ThreadDictionary
A map we use to translate thread IDs to thread names.
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.
const std::type_info * GetTypeInfo()
TAString & _(const TAppendable &src)
static Thread * Get(std::thread::id nativeID)
Reach
Denotes the reach of something.
Case
Denotes upper and lower case character treatment.
Inclusion
Denotes how members of a set something should be taken into account.
integer ThreadID
The ALib thread identifier type.
monomem::TMonoAllocator< lang::HeapAllocator > MonoAllocator
strings::TString< nchar > NString
Type alias in namespace #"%alib".
containers::LRUCacheTable< TAllocator, TValueDescriptor, THash, TEqual > LRUCacheTable
Type alias in namespace #"%alib".
variables::Priority Priority
Type alias in namespace #"%alib".
threads::Thread Thread
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".
containers::HashMap< TAllocator, TKey, TMapped, THash, TEqual, THashCaching, TRecycling > HashMap
Type alias in namespace #"%alib".
strings::TString< character > String
Type alias in namespace #"%alib".
time::Ticks Ticks
Type alias in namespace #"%alib".
constexpr PathCharType DIRECTORY_SEPARATOR
The standard path separator character. Defaults to '\' on Windows OS, '/' else.
strings::TAString< character, lang::HeapAllocator > AString
Type alias in namespace #"%alib".
std::vector< T, StdMA< T > > StdVectorMA
Type alias in namespace #"%alib".
static void GetState(LoxImpl *impl, NAString &buf, StateInfo flags)
static void MapThreadName(LoxImpl *impl, const String &threadName, threads::ThreadID id)
Ticks timeStamp
Time of the call that created this record.
const std::type_info * typeInfo
Type information. Nullptr if call from static or global function.
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 name
File name (evaluated).
NString nameWOExt
File name without extension (evaluated).
integer origFilePathLength
Index of the last path separator in #".origFile".
NString fullPath
Full path of source file (evaluated).
ParsedFileName(const NCString filename)
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.
NCString Key(ParsedFileName &src) const