ALib C++ Framework
by
Library Version: 2511 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
loxpimpl.inl
Go to the documentation of this file.
1//==================================================================================================
2/// \file
3/// This header-file is part of module \alib_alox of the \aliblong.
4///
5/// \emoji :copyright: 2013-2025 A-Worx GmbH, Germany.
6/// Published under #"mainpage_license".
7//==================================================================================================
8ALIB_EXPORT namespace alib::lox {
9namespace detail {
10class Domain;
11class Logger;
12}
13namespace textlogger { class TextLogger; }
14} // namespace [alib::lox]
15
16
17ALIB_EXPORT namespace alib { namespace lox { namespace detail {
18
19struct LoxImpl;
20
21//==================================================================================================
22/// Struct that collects static functions that provide the implementation of methods of
23/// class #"Lox". Almost all functions expect a pointer to the hidden implementation type
24/// <b>LoxImpl</b> as the first parameter.
25//==================================================================================================
26struct LI {
27 /// Implementation of the constructor #"Lox::Lox;the constructor" of class \b %Lox.
28 /// @param name The name of the Lox. Will be copied and converted to upper case.
29 /// @return The implementation for the calling \b Lox.
30 ALIB_DLL static
31 LoxImpl* Construct( const NString& name );
32
33 /// Destructs a lox.
34 /// @param lox The \b %Lox that is to be destructed.
35 ALIB_DLL static
36 void Destruct( LoxImpl* lox );
37
38 /// Resets this object. Concretely, the following steps are performed:
39 /// - If the debug lox singleton exists, it is deleted.
40 /// - It is asserted that no other lox object is registered.
41 /// - The \alox path of the configuration is deleted.
42 ///
43 /// \attention
44 /// This method was introduced to support resetting \alox in the unit tests.
45 /// In real applications, this method should NOT be used.
46 /// Side effects might appear using this method and it is not tested otherwise than
47 /// used in tests!
49
50 /// Implementation of the method #"Lox::GetName;*".
51 ///
52 /// @param impl The implementation struct of the \b Lox.
53 /// @returns The name of this %Lox.
54 ALIB_DLL static
55 const NString& GetName(LoxImpl* impl);
56
57 /// Implementation of the method #"Lox::GetLogCounter;*".
58 ///
59 /// @param impl The implementation struct of the \b Lox.
60 /// @returns The name of this %Lox.
61 ALIB_DLL static
63
64 /// Implementation of the method #"Lox::Acquire;*".
65 ///
66 /// @param impl The implementation struct of the \b Lox.
67 /// @param ci The source location that the call is placed at.
68 /// Usually macro #"ALIB_CALLER" is passed here.
69 ALIB_DLL static
70 void Acquire(LoxImpl* impl, const lang::CallerInfo& ci );
71
72 /// Implementation of the method #"Lox::Release;*".
73 /// @param impl The implementation struct of the \b Lox.
74 ALIB_DLL static
75 void Release(LoxImpl* impl);
76
77 /// Implementation of the method #"Lox::Reset;*".
78 /// @param impl The implementation struct of the \b Lox.
79 ALIB_DLL static
80 void Reset(LoxImpl* impl);
81
82 /// Implementation of the method #"Lox::SetFileNameCacheCapacity;*".
83 /// @param impl The implementation struct of the \b Lox.
84 /// @param numberOfLists The number of LRU-lists to use.
85 /// @param entriesPerList The maximum length of each cache list.
86 ALIB_DLL static
87 void SetFileNameCacheCapacity(LoxImpl* impl, integer numberOfLists, integer entriesPerList );
88
89 /// Implementation of the method #"Lox::SetSourcePathTrimRule;*".
90 /// @param impl The implementation struct of the \b Lox.
91 /// @param path The path to search for. If not starting with <c> '*'</c>,
92 /// a prefix is searched.
93 /// @param includeString Determines if \p{path} should be included in the trimmed path or
94 /// not.
95 /// Optional and defaults to \b %Inclusion::Exclude.
96 /// @param trimOffset Adjusts the portion of \p{path} that is trimmed.
97 /// Optional and defaults to \c 0.
98 /// @param sensitivity Determines if the comparison of \p{path} with a source file's path
99 /// is performed case-sensitive or not.
100 /// Optional and defaults to \b Case::Ignore.
101 /// @param trimReplacement Replacement string for trimmed portion of the path.
102 /// Optional and defaults to \b %NULL_STRING.
103 /// @param reach Denotes whether the rule is applied locally (to this \b %Lox only)
104 /// or applies to all instances of class \b %Lox.
105 /// Defaults to \b %Reach::Global.
106 /// @param priority The priority of the setting. Defaults to
107 /// #"Priority::DefaultValues".
108 ALIB_DLL static
109 void SetSourcePathTrimRule( LoxImpl* impl,
110 const NCString& path,
111 lang::Inclusion includeString ,
112 int trimOffset ,
113 lang::Case sensitivity ,
114 const NString& trimReplacement,
115 lang::Reach reach ,
116 Priority priority );
117
118
119 /// Implementation of the method #"Lox::GetLogger;*".
120 /// @param impl The implementation struct of the \b Lox.
121 /// @param loggerName The name of the \e Logger to search for (case-insensitive).
122 /// @return The logger, nullptr if not found.
123 ALIB_DLL static
124 detail::Logger* GetLogger( LoxImpl* impl, const NString& loggerName );
125
126 /// Implementation of the method #"Lox::RemoveLogger(detail::Logger*)".
127 /// @param impl The implementation struct of the \b Lox.
128 /// @param logger The logger to be removed.
129 /// @returns \c true, if the \e Logger was found and removed, \c false otherwise.
130 ALIB_DLL static
131 bool RemoveLogger( LoxImpl* impl, detail::Logger* logger );
132
133 /// Implementation of the method #"Lox::RemoveLogger(const NString&)".
134 /// @param impl The implementation struct of the \b Lox.
135 /// @param loggerName The name of the \e Logger(s) to be removed (case-insensitive).
136 /// @returns The logger that was removed, \c nullptr if not found.
137 ALIB_DLL static
138 detail::Logger* RemoveLogger( LoxImpl* impl, const NString& loggerName );
139
140 /// Implementation of the method #"Lox::SetVerbosity(detail::Logger*, Verbosity, const NString&, Priority);Lox::SetVerbosity".
141 /// @param impl The implementation struct of the \b Lox.
142 /// @param logger The logger to be to be affected (case-insensitive).
143 /// @param verbosity The 'level of verboseness' to be set.
144 /// @param domain The parent (start) domain to be set. The use of absolute paths
145 /// starting with <c> '/'</c> are recommended.
146 /// Defaults to root domain \"/\".
147 /// @param priority The priority of the setting. Defaults to
148 /// #"Priority::DefaultValues".
149 ALIB_DLL static
150 void SetVerbosity( LoxImpl* impl,
151 detail::Logger* logger,
152 Verbosity verbosity,
153 const NString& domain,
154 Priority priority );
155
156 /// Implementation of the method #"Lox::SetVerbosity(detail::Logger*);Lox::SetVerbosity".
157 /// @param impl The implementation struct of the \b Lox.
158 /// @param loggerName The logger to be to be affected, identified by its name (case
159 /// insensitive).
160 /// @param verbosity The 'level of verboseness' to be set.
161 /// @param domain The parent (start) domain to be set. The use of absolute paths
162 /// starting with <c> '/'</c> are recommended.
163 /// Defaults to root domain \"/\".
164 /// @param priority The priority of the setting. Defaults to
165 /// #"Priority::DefaultValues".
166 ALIB_DLL static
167 void SetVerbosity( LoxImpl* impl,
168 const NString& loggerName,
169 Verbosity verbosity,
170 const NString& domain,
171 Priority priority );
172
173
174 /// Implementation of the method #"Lox::SetDomain(const NString&, Scope, threads::Thread*)".
175 /// @param impl The implementation struct of the \b Lox.
176 /// @param scopeDomain The domain path to register.
177 /// @param scope Either \e %Scope::ThreadOuter or \e %Scope::ThreadInner. With other
178 /// values, an internal error is logged.
179 /// @param thread The thread to set/unset a thread-related Scope Domains for.
180 ALIB_DLL static
181 void SetDomain( LoxImpl* impl, const NString& scopeDomain, Scope scope,
182 threads::Thread* thread );
183
184 /// Implementation of the method #"Lox::SetDomainSubstitutionRule;*".
185 /// @param impl The implementation struct of the \b Lox.
186 /// @param domainPath The path to search. Has to start with either <c> '/'</c> or <c> '*'</c>.
187 /// @param replacement The replacement path.
188 ALIB_DLL static
190 const NString& domainPath,
191 const NString& replacement );
192
193 /// Implementation of the method #"Lox::RemoveThreadDomain;*".
194 /// @param impl The implementation struct of the \b Lox.
195 /// @param scopeDomain The domain path to register.
196 /// @param scope Either \e %Scope::ThreadOuter or \e %Scope::ThreadInner. With other
197 /// values, an internal error is logged.
198 /// @param thread The thread to set/unset a thread-related Scope Domains for.
199 ALIB_DLL static
200 void RemoveThreadDomain( LoxImpl* impl, const NString& scopeDomain, Scope scope,
201 threads::Thread* thread );
202
203
204
205 /// Implementation of the method #"Lox::SetPrefix(const Box&,const NString&,lang::Inclusion);*".
206 /// @param impl The implementation struct of the \b Lox.
207 /// @param prefix The <em>Prefix Logable</em> to set.
208 /// @param domain The domain path. Defaults to \c nullptr, resulting in
209 /// evaluated <em>Scope Domain</em> path.
210 /// @param otherPLs If set to \c Inclusion::Exclude, scope-related <em>Prefix Logables</em>
211 /// are ignored and only domain-related <em>Prefix Logables</em> are passed to
212 /// the \e Loggers.
213 ALIB_DLL static
214 void SetPrefix( LoxImpl* impl, const Box& prefix, const NString& domain,
215 lang::Inclusion otherPLs );
216
217 /// Implementation of the method #"Lox::SetStartTime(Ticks, const NString&)".
218 /// @param impl The implementation struct of the \b Lox.
219 /// @param startTime Optional parameter with the new start time. Defaults
220 /// to current time if omitted.
221 /// @param loggerName The name of the \e Logger(s) whose start time is to be set
222 /// (case-insensitive).
223 /// Defaults to nullptr, which indicates that all loggers are to
224 /// be affected.
225 ALIB_DLL static
226 void SetStartTime( LoxImpl* impl,
227 Ticks startTime,
228 const NString& loggerName );
229
230 #if defined (__GLIBCXX__) || defined(_LIBCPP_VERSION) || defined(__APPLE__) || defined(__ANDROID_NDK__)
231 /// Implementation of the method #"Lox::SetStartTime(Ticks, const NString&)".
232 /// @param impl The implementation struct of the \b Lox.
233 /// @param startTime The new start time in system-specific time unit.
234 /// @param loggerName The name of the \e Logger whose start time is to be set (case
235 /// insensitive).
236 /// Defaults to empty string, which indicates that all loggers are to
237 /// be affected.
238 ALIB_DLL static
239 void SetStartTime( LoxImpl* impl, time_t startTime, const NString& loggerName );
240
241
242 #endif // no elif here, otherwise doxygen would ignore it!
243
244 #if defined( _MSC_VER )
245 //==========================================================================================
246 /// Implementation of the method
247 /// #"Lox::SetStartTime(const FILETIME&, const NString&)".
248 /// @param impl The implementation struct of the \b Lox.
249 /// @param startTime The new start time in system-specific time unit.
250 /// @param loggerName The name of the \e Logger whose start time is to be set (case
251 /// insensitive).
252 /// Defaults to empty string, which indicates that all loggers are to
253 /// be affected.
254 //==========================================================================================
255 ALIB_DLL static
257 const FILETIME& startTime,
258 const NString& loggerName );
259 #endif
260
261 /// Implementation of the method #"Lox::MapThreadName;*".
262 /// @param impl The implementation struct of the \b Lox.
263 /// @param threadName The name of the thread as it should be displayed in the logs.
264 /// @param id The thread ID.
265 ALIB_DLL static
266 void MapThreadName( LoxImpl* impl, const String& threadName, threads::ThreadID id );
267
268 /// Implementation of the method #"Lox::State;*".
269 /// @param impl The implementation struct of the \b Lox.
270 /// @param domain Optional <em>Log Domain</em> which is combined with
271 /// <em>%Scope Domains</em> set for the \e %Scope of invocation.
272 /// @param verbosity The verbosity.
273 /// @param headLine If given, a separated headline will be logged at first place.
274 /// @param flags Flag bits that define which state information is logged.
275 ALIB_DLL static
276 void State( LoxImpl* impl,
277 const NString& domain,
278 Verbosity verbosity,
279 const String& headLine,
280 StateInfo flags );
281
282 /// Implementation of the method #"Lox::GetState;*".
283 /// @param impl The implementation struct of the \b Lox.
284 /// @param buf The target string.
285 /// @param flags Bits that define which state information is collected.
286 ALIB_DLL static
287 void GetState( LoxImpl* impl, NAString& buf, StateInfo flags );
288
289 /// Implementation of the method #"Lox::GetLogableContainer;*".
290 /// @param impl The implementation struct of the \b Lox.
291 /// @return An empty list of boxes.
292 ALIB_DLL static
294
295 /// Implementation of the method #"Lox::Entry;*".
296 /// @param impl The implementation struct of the \b Lox.
297 /// @param domain The domain.
298 /// @param verbosity The verbosity.
299 ALIB_DLL static
300 void Entry( LoxImpl* impl, const NString& domain, Verbosity verbosity );
301
302 /// Implementation of the method #"Lox::IsActive;*".
303 ///
304 /// @param impl The implementation struct of the \b Lox.
305 /// @param verbosity The verbosity to query for activity.
306 /// @param domain The log domain. All rules for resolving the effective log domain
307 /// apply as with normal log statements.
308 /// @param resultDomain An optional pointer to an \b AString. If given, the resulting
309 /// domain is appended to the string.
310 /// (The domain that results from the optional \p{domain} and all \alox
311 /// rules that apply at the place of invocation).
312 /// @return The number of active loggers.
313 ALIB_DLL static
314 int IsActive( LoxImpl* impl, Verbosity verbosity, const NString& domain,
315 NAString* resultDomain );
316
317 /// Implementation of the method #"Lox::GetVerbosity;*".
318 ///
319 /// @param impl The implementation struct of the \b Lox.
320 /// @param domain The log domain. All rules for resolving the effective log domain
321 /// apply as with normal log statements.
322 /// @param resultDomain An optional pointer to an \b AString. If given, the resulting
323 /// domain is appended to the string.
324 /// (The domain that results from the optional \p{domain} and all \alox
325 /// rules that apply at the place of invocation).
326 /// @return The "lowest" verbosity that has an active logger.
327 ALIB_DLL static
328 Verbosity GetVerbosity( LoxImpl* impl, const NString& domain, NAString* resultDomain );
329
330//##################################################################################################
331// Debug methods
332//##################################################################################################
333#if ALIB_DEBUG_MEMORY
334 //==============================================================================================
335 /// Implementation of the method #"Lox::DbgGetMonoAllocator;*".
336 /// @param impl The implementation struct of the \b Lox.
337 /// @return The monotonic allocator of this \b Lox.
338 //==============================================================================================
339 ALIB_DLL static
341#endif
342
343
344//##################################################################################################
345// internals
346//##################################################################################################
347
348 /// Assembles the resulting domain from the given \p{domainPath} and the Scope Domain paths
349 /// (see #".SetDomain") according to the scope identified by \p{scopeInfo}.
350 /// The resulting full domain string is assembled from inner to outer scope.
351 /// If \p{domainPath}, respectively as soon as any of the Scope Domain's paths
352 /// start with the character defined with
353 /// #"alib::lox::detail::Domain::Separator;Domain::Separator",
354 /// the evaluation is stopped (the path is interpreted as absolute).
355 ///
356 /// @param impl The implementation struct of the \b Lox.
357 /// @param domainPath The domain path. If starting with the character defined with
358 /// #"alib::lox::detail::Domain::Separator;Domain::Separator",
359 /// no scope domains are applied.
360 /// @return The resulting #"alib::lox::detail::Domain;Domain".
361 ALIB_DLL static
362 detail::Domain* evaluateResultDomain( LoxImpl* impl, const NString& domainPath );
363
364 /// Invokes \b Find on the given domain and logs internal message when the domain was
365 /// not known before.
366 ///
367 /// @param impl The implementation struct of the \b Lox.
368 /// @param domainSystem The domain system. Either the standard or the internal one.
369 /// @param domainPath The domain path.
370 /// @return The resulting #"alib::lox::detail::Domain;Domain".
371 ALIB_DLL static
373 detail::Domain& domainSystem,
374 NString domainPath );
375
376 /// This method is looping over the \e Loggers, checking their verbosity against the given
377 /// one, and, if they match, invoke the log method of the \e Logger.
378 /// With the first logger identified to be active, the <em>Prefix Objects</em> get
379 /// collected from the scope store.
380 /// @param impl The implementation struct of the \b Lox.
381 /// @param dom The domain to log on
382 /// @param verbosity The verbosity.
383 /// @param logables The objects to log.
384 /// @param prefixes Denotes if prefixes should be included or not.
385 ALIB_DLL static
386 void log( LoxImpl* impl,
387 detail::Domain* dom,
388 Verbosity verbosity,
389 BoxesMA& logables,
390 lang::Inclusion prefixes );
391
392
393 /// Logs an internal error message using the internal domain tree as defined in
394 /// #"alib::lox::Lox::InternalDomains;Lox::InternalDomains".
395 ///
396 /// @param impl The implementation struct of the \b Lox.
397 /// @param verbosity The verbosity.
398 /// @param subDomain The subdomain of the internal domain to log into.
399 /// @param msg The message.
400 ALIB_DLL static
401 void logInternal( LoxImpl* impl, Verbosity verbosity, const NString& subDomain,
402 BoxesMA& msg );
403
404 /// Overloaded version accepting a string to log.
405 ///
406 /// @param impl The implementation struct of the \b Lox.
407 /// @param verbosity The verbosity.
408 /// @param subDomain The subdomain of the internal domain to log into.
409 /// @param msg The message.
410 ALIB_DLL static
411 void logInternal( LoxImpl* impl, Verbosity verbosity, const NString& subDomain,
412 const NString& msg );
413
414 /// Returns a reference to a list of boxes to be used by internal logging.
415 /// Each invocation has to be followed by an invocation to #".logInternal(BoxesMA&)"
416 /// which releases the logables.
417 ///
418 /// @param impl The implementation struct of the \b Lox.
419 /// @return A list of boxes.
420 ALIB_DLL static
422
423 /// Implementation of the interface method fetching all possible parameters.
424 ///
425 /// @param impl The implementation struct of the \b Lox.
426 /// @param scopeDomain The domain path to register.
427 /// @param scope The scope that the given \p{domain} should be registered for.
428 /// Available Scope definitions are platform/language dependent.
429 /// @param removeNTRSD Used to remove a named thread-related Scope Domain (and is true only
430 /// when invoked by interface method #".RemoveThreadDomain".
431 /// @param thread The thread to set/unset a thread-related Scope Domain for.
432 ALIB_DLL static
433 void setDomain( LoxImpl* impl, const NString& scopeDomain, Scope scope,
434 bool removeNTRSD, threads::Thread* thread );
435
436 /// Implementation of the interface method fetching all possible parameters.
437 ///
438 /// @param impl The implementation struct of the \b Lox.
439 /// @param prefix The <em>Prefix Logable</em> to set.
440 /// @param scope The scope that the given \p{logable} should be registered for.
441 /// Available Scope definitions are platform/language dependent.
442 /// @param thread The thread to set/unset a thread-related <em>Prefix Logable</em> for.
443 ALIB_DLL static
444 void setPrefix( LoxImpl* impl, const Box& prefix, Scope scope, threads::Thread* thread );
445
446 /// Increases the internal log counter of \p{impl}.
447 /// @param impl The implementation struct of the \b Lox.
448 ALIB_DLL static
449 void IncreaseLogCounter( LoxImpl* impl);
450
451 /// Implementation of the method #"Lox::EntryDetectDomain;*".
452 ///
453 /// @param impl The implementation struct of the \b Lox.
454 /// @param verbosity The verbosity.
455 ALIB_DLL static
456 void entryDetectDomainImpl( LoxImpl* impl, Verbosity verbosity);
457
458 /// Internal method serving public interface #"Lox::Once(const NString&, Verbosity, const Box&, const String&, Scope, int);Lox::Once".
459 ///
460 /// @param impl The implementation struct of the \b Lox.
461 /// @param domain Optional <em>Log Domain</em> which is combined with
462 /// <em>%Scope Domains</em> set for the \e %Scope of invocation.
463 /// @param verbosity The verbosity of the <em>Log Statement</em> (if performed).
464 /// @param logables The objects to log (Multiple objects may be provided within
465 /// container class Boxes.)
466 /// @param pGroup The optional name of the statement group. If used, all statements that
467 /// share the same group name are working on the same counter (according
468 /// to the \p{scope}.)
469 /// If omitted (or empty or nullptr), the counter is bound to the
470 /// \e %Scope provided. If omitted and \p{scope} is Scope::Global, then the
471 /// counter is associated exclusively with the single <em>Log Statement</em>
472 /// itself.
473 /// @param scope The \e %Scope that the group or counter is bound to.
474 /// @param quantity The number of logs to be performed. As the name of the method indicates,
475 /// this defaults to \c 1.
476 ALIB_DLL static
477 void once( LoxImpl* impl , const NString& domain, Verbosity verbosity,
478 const Box& logables, const String& pGroup, Scope scope,
479 int quantity );
480
481 /// Internal method serving public interface #"Lox::Store(const Box&, Scope);Lox::Store".
482 ///
483 /// @param impl The implementation struct of the \b Lox.
484 /// @param data The data object to store.
485 /// In C++, has to be heap allocated and will be deleted
486 /// by this \b %Lox when overwritten or this lox is deleted.
487 /// @param pKey The key to the data.
488 /// @param scope The \e %Scope that the data is bound to.
489 ALIB_DLL static
490 void store( LoxImpl* impl, const Box& data, const NString& pKey, Scope scope );
491
492 /// Internal method serving public interface #"Lox::Retrieve(const NString&);Lox::Retrieve".
493 ///
494 /// @param impl The implementation struct of the \b Lox.
495 /// @param pKey The key to the data.
496 /// @param scope The \e %Scope that the data is bound to.
497 /// @return The data, a \e nulled box if no value was found.
498 ALIB_DLL static
499 Box retrieve( LoxImpl* impl, const NString& pKey, Scope scope );
500
501 /// Checks if given scope is thread-related.
502 ///
503 /// @param impl The implementation struct of the \b Lox.
504 /// @param scope The scope that is to be checked.
505 /// @return \c true if \p{scope} is thread-related, \c false else.
506 ALIB_DLL static
507 bool isThreadRelatedScope( LoxImpl* impl, Scope scope );
508
509 /// Checks if given scope needs information that is not available. In addition, the
510 /// in/out parameter \p{scope} is changed to \b Scope::Path, in case a level was added.
511 ///
512 /// @param impl The implementation struct of the \b Lox.
513 /// @param[in,out] scope A reference to the scope that is to be checked (and eventually
514 /// modified.
515 /// @param internalDomain The internal subdomain to log any error/warning into.
516 /// @return A positive value providing the path level deduced from \p{scope} if all is fine,
517 /// \c -1 else.
518 ALIB_DLL static
519 int checkScopeInformation( LoxImpl* impl , Scope& scope,
520 const NString& internalDomain );
521
522 /// Used on construction and with #Reset.
523 /// @param impl The implementation struct of the \b Lox.
524 ALIB_DLL static
525 void init(LoxImpl* impl);
526
527 /// Reads the verbosity for the given logger and domain from the \alib variable system.
528 /// This internal method is used in two occasions:
529 /// - when a new logger is added: recursively for all existing domains (\p{configStr} is
530 /// given)
531 /// - when a new domain is created on the fly(\p{configStr} is not given)
532 ///
533 /// The variable is already read and found in an internal instance.
534 ///
535 /// @param impl The implementation struct of the \b Lox.
536 /// @param variable The loaded variable with verbosity information.
537 /// @param logger The logger to set the verbosity for.
538 /// @param dom The domain to set the verbosity for.
539 ALIB_DLL static
541 variables::Variable& variable,
542 detail::Logger* logger,
543 detail::Domain& dom );
544
545 /// Reads a prefix string from the \alib variable system.
546 /// This internal method is used when a new domain is created,
547 ///
548 /// @param impl The implementation struct of the \b Lox.
549 /// @param dom The domain to set the verbosity for.
550 ALIB_DLL static
552
553
554 /// Reads the verbosity for the given logger and domain from the \alib variable system.
555 /// This internal method is used when a new logger is added.
556 /// Walks recursively for all existing domains.
557 ///
558 /// @param impl The implementation struct of the \b Lox.
559 /// @param variable The loaded variable with verbosity information.
560 /// @param logger The logger to set the verbosity for.
561 /// @param dom The domain to set the verbosity for.
562 ALIB_DLL static
563 void getAllVerbosities( LoxImpl* impl, variables::Variable& variable,
564 detail::Logger* logger, detail::Domain& dom );
565
566 /// Implements functionality for configuration variable \c LOXNAME_DUMP_STATE_ON_EXIT.
567 /// Is called when a logger is removed.
568 /// @param impl The implementation struct of the \b Lox.
569 ALIB_DLL static
571
572 /// Implements functionality for configuration variable \c LOXNAME_LOGGERNAME_VERBOSITY.
573 /// Is called when a logger is removed.
574 /// @param impl The implementation struct of the \b Lox.
575 /// @param logger The logger to write the verbosity for.
576 ALIB_DLL static
577 void writeVerbositiesOnLoggerRemoval( LoxImpl* impl, Logger* logger );
578
579#if !ALIB_SINGLE_THREADED
580 /// Returns the internal lock.
581 /// @param impl The implementation struct of the \b Lox.
582 /// @returns The internal \b RecursiveLock of this \b %Lox.
583 ALIB_DLL static
585#endif
586
587}; // struct LI
588
589}}} // namespace [alib::lox::detail]
590
592 ALIB_COMMA alib::variables::Priority> , vt_lox_pair_verby_prio )
#define ALIB_DLL
Definition alib.inl:573
#define ALIB_EXPORT
Definition alib.inl:562
#define ALIB_COMMA
Definition alib.inl:1041
#define ALIB_BOXING_VTABLE_DECLARE(TMapped, Identifier)
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.
This namespaces defines class TextLogger and its helpers.
Definition loxpimpl.inl:13
integer ThreadID
The ALib thread identifier type.
Definition thread.inl:23
monomem::TMonoAllocator< lang::HeapAllocator > MonoAllocator
strings::TString< nchar > NString
Type alias in namespace alib.
Definition string.inl:2181
strings::TCString< nchar > NCString
Type alias in namespace alib.
Definition cstring.inl:408
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.
Definition integers.inl:149
boxing::Box Box
Type alias in namespace alib.
Definition box.inl:1135
strings::TString< character > String
Type alias in namespace alib.
Definition string.inl:2172
boxing::TBoxes< MonoAllocator > BoxesMA
Type alias in namespace alib.
Definition boxes.inl:193
time::Ticks Ticks
Type alias in namespace alib.
Definition ticks.inl:79
static BoxesMA & GetLogableContainer(LoxImpl *impl)
static const NString & GetName(LoxImpl *impl)
Definition loxpimpl.cpp:290
static void getVerbosityFromConfig(LoxImpl *impl, variables::Variable &variable, detail::Logger *logger, detail::Domain &dom)
static BoxesMA & acquireInternalLogables(LoxImpl *impl)
static void SetFileNameCacheCapacity(LoxImpl *impl, integer numberOfLists, integer entriesPerList)
Definition loxpimpl.cpp:390
static detail::Domain * evaluateResultDomain(LoxImpl *impl, const NString &domainPath)
static void logInternal(LoxImpl *impl, Verbosity verbosity, const NString &subDomain, BoxesMA &msg)
static void SetStartTime(LoxImpl *impl, Ticks startTime, const NString &loggerName)
static integer & GetLogCounter(LoxImpl *impl)
Definition loxpimpl.cpp:292
static int checkScopeInformation(LoxImpl *impl, Scope &scope, const NString &internalDomain)
static void init(LoxImpl *impl)
Definition loxpimpl.cpp:321
static void Destruct(LoxImpl *lox)
Definition loxpimpl.cpp:284
static void store(LoxImpl *impl, const Box &data, const NString &pKey, Scope scope)
static void IncreaseLogCounter(LoxImpl *impl)
static void RemoveThreadDomain(LoxImpl *impl, const NString &scopeDomain, Scope scope, threads::Thread *thread)
Definition loxpimpl.cpp:828
static bool RemoveLogger(LoxImpl *impl, detail::Logger *logger)
Definition loxpimpl.cpp:566
static void SetVerbosity(LoxImpl *impl, detail::Logger *logger, Verbosity verbosity, const NString &domain, Priority priority)
Definition loxpimpl.cpp:629
static void SetDomain(LoxImpl *impl, const NString &scopeDomain, Scope scope, threads::Thread *thread)
Definition loxpimpl.cpp:410
static detail::Domain * findDomain(LoxImpl *impl, detail::Domain &domainSystem, NString domainPath)
static void SetDomainSubstitutionRule(LoxImpl *impl, const NString &domainPath, const NString &replacement)
Definition loxpimpl.cpp:848
static void SetPrefix(LoxImpl *impl, const Box &prefix, const NString &domain, lang::Inclusion otherPLs)
Definition loxpimpl.cpp:962
static void Release(LoxImpl *impl)
Definition loxpimpl.cpp:313
static void writeVerbositiesOnLoggerRemoval(LoxImpl *impl, Logger *logger)
Definition loxpimpl.cpp:450
static void setPrefix(LoxImpl *impl, const Box &prefix, Scope scope, threads::Thread *thread)
Definition loxpimpl.cpp:906
static void log(LoxImpl *impl, detail::Domain *dom, Verbosity verbosity, BoxesMA &logables, lang::Inclusion prefixes)
static void entryDetectDomainImpl(LoxImpl *impl, Verbosity verbosity)
static void getAllVerbosities(LoxImpl *impl, variables::Variable &variable, detail::Logger *logger, detail::Domain &dom)
static void once(LoxImpl *impl, const NString &domain, Verbosity verbosity, const Box &logables, const String &pGroup, Scope scope, int quantity)
static void SetSourcePathTrimRule(LoxImpl *impl, const NCString &path, lang::Inclusion includeString, int trimOffset, lang::Case sensitivity, const NString &trimReplacement, lang::Reach reach, Priority priority)
Definition loxpimpl.cpp:397
static void Entry(LoxImpl *impl, const NString &domain, Verbosity verbosity)
static void getDomainPrefixFromConfig(LoxImpl *impl, detail::Domain &dom)
static LoxImpl * Construct(const NString &name)
Definition loxpimpl.cpp:274
static void Acquire(LoxImpl *impl, const lang::CallerInfo &ci)
Definition loxpimpl.cpp:302
static int IsActive(LoxImpl *impl, Verbosity verbosity, const NString &domain, NAString *resultDomain)
static void GetState(LoxImpl *impl, NAString &buf, StateInfo flags)
static MonoAllocator & DbgGetMonoAllocator(LoxImpl *impl)
Definition loxpimpl.cpp:394
static Box retrieve(LoxImpl *impl, const NString &pKey, Scope scope)
static void setDomain(LoxImpl *impl, const NString &scopeDomain, Scope scope, bool removeNTRSD, threads::Thread *thread)
Definition loxpimpl.cpp:759
static void dumpStateOnLoggerRemoval(LoxImpl *impl)
Definition loxpimpl.cpp:501
static void SetStartTime(LoxImpl *impl, const FILETIME &startTime, const NString &loggerName)
static detail::Logger * GetLogger(LoxImpl *impl, const NString &loggerName)
Definition loxpimpl.cpp:420
static threads::RecursiveLock & getLock(LoxImpl *impl)
Definition loxpimpl.cpp:295
static bool isThreadRelatedScope(LoxImpl *impl, Scope scope)
static void State(LoxImpl *impl, const NString &domain, Verbosity verbosity, const String &headLine, StateInfo flags)
static Verbosity GetVerbosity(LoxImpl *impl, const NString &domain, NAString *resultDomain)
static void MapThreadName(LoxImpl *impl, const String &threadName, threads::ThreadID id)