30#if !ALIB_SINGLE_THREADED
76 #if !ALIB_SINGLE_THREADED
218 const NString& trimReplacement,
235 if( srcFile.fullPath.IsNull() ) {
238 srcFile.fullPath=
NString( srcFile.origFile.Buffer(), idx );
240 srcFile.fullPath=
"";
243 return srcFile.fullPath;
251 if( srcFile.trimmedPath.IsNull() )
254 target.
_( srcFile.trimmedPathPrefix )
255 .
_( srcFile.trimmedPath );
262 if( srcFile.name.IsNull() ) {
265 srcFile.name=
NString( srcFile.origFile.Buffer() + idx + 1,
266 srcFile.origFile.Length() - idx - 1 );
278 if( srcFile.nameWOExt.IsNull() ) {
280 integer lastDot= srcFile.nameWOExt.LastIndexOf(
'.' );
282 srcFile.nameWOExt=
NString( srcFile.nameWOExt.Buffer(), lastDot );
284 return srcFile.nameWOExt;
305#if !ALIB_SINGLE_THREADED
360 if( srcFile.origFilePathLength == -2 )
362 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.
constexpr PathCharType DIRECTORY_SEPARATOR
The standard path separator character. Defaults to '\' on Windows OS, '/' else.
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.
threads::Thread Thread
Type alias in namespace alib.
strings::TCString< nchar > NCString
Type alias in namespace alib.
alib::variables::Priority Priority
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.
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 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 name
File name (evaluated).
NString nameWOExt
File name without extension (evaluated).
integer origFilePathLength
Index of 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.
Serves as template parameter TValueDescriptor of field parsedFileNameCache.
NCString Key(ParsedFileName &src) const