ALib C++ Library
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 \ref mainpage_license "Boost Software 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 \alib{lox;Lox}. For most; the first parameter is of type \p{lox;detail::LoxImpl}.
24//==================================================================================================
25struct LI
26{
27 /// Implementation of the constructor \alib{lox;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 \alib{lox;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 \alib{lox;Lox::GetLogCounter}.
58 ///
59 /// @param impl The implementation struct of the \b Lox.
60 /// @returns The name of this %Lox.
61 ALIB_DLL static
62 integer& GetLogCounter(LoxImpl* impl);
63
64 /// Implementation of the method \alib{lox;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 \ref ALIB_CALLER is passed here.
69 ALIB_DLL static
70 void Acquire(LoxImpl* impl, const lang::CallerInfo& ci );
71
72 /// Implementation of the method \alib{lox;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 \alib{lox;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 \alib{lox;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 \alib{lox;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 /// \alib{variables;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 \alib{lox;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 \alib{lox;Lox::RemoveLogger}.
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 \alib{lox;Lox::RemoveLogger}.
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 \alib{lox;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 /// \alib{variables;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 \alib{lox;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 /// \alib{variables;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 \alib{lox;Lox::SetDomain}.
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 \alib{lox;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
189 void SetDomainSubstitutionRule( LoxImpl* impl,
190 const NString& domainPath,
191 const NString& replacement );
192
193 /// Implementation of the method \alib{lox;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 \alib{lox;Lox::SetPrefix}.
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 \alib{lox;Lox::SetStartTime}.
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 \alib{lox;Lox::SetStartTime}.
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 \alib{lox;Lox::SetStartTime}.
247 /// @param impl The implementation struct of the \b Lox.
248 /// @param startTime The new start time in system-specific time unit.
249 /// @param loggerName The name of the \e Logger whose start time is to be set (case
250 /// insensitive).
251 /// Defaults to empty string, which indicates that all loggers are to
252 /// be affected.
253 //==========================================================================================
254 ALIB_DLL static
255 void SetStartTime( LoxImpl* impl,
256 const FILETIME& startTime,
257 const NString& loggerName );
258 #endif
259
260 /// Implementation of the method \alib{lox;Lox::MapThreadName}.
261 /// @param impl The implementation struct of the \b Lox.
262 /// @param threadName The name of the thread as it should be displayed in the logs.
263 /// @param id The thread ID.
264 ALIB_DLL static
265 void MapThreadName( LoxImpl* impl, const String& threadName, threads::ThreadID id );
266
267 /// Implementation of the method \alib{lox;Lox::State}.
268 /// @param impl The implementation struct of the \b Lox.
269 /// @param domain Optional <em>Log Domain</em> which is combined with
270 /// <em>%Scope Domains</em> set for the \e %Scope of invocation.
271 /// @param verbosity The verbosity.
272 /// @param headLine If given, a separated headline will be logged at first place.
273 /// @param flags Flag bits that define which state information is logged.
274 ALIB_DLL static
275 void State( LoxImpl* impl,
276 const NString& domain,
277 Verbosity verbosity,
278 const String& headLine,
279 StateInfo flags );
280
281 /// Implementation of the method \alib{lox;Lox::GetState}.
282 /// @param impl The implementation struct of the \b Lox.
283 /// @param buf The target string.
284 /// @param flags Bits that define which state information is collected.
285 ALIB_DLL static
286 void GetState( LoxImpl* impl, NAString& buf, StateInfo flags );
287
288 /// Implementation of the method \alib{lox;Lox::GetLogableContainer}.
289 /// @param impl The implementation struct of the \b Lox.
290 /// @return An empty list of boxes.
291 ALIB_DLL static
292 BoxesMA& GetLogableContainer( LoxImpl* impl );
293
294 /// Implementation of the method \alib{lox;Lox::Entry}.
295 /// @param impl The implementation struct of the \b Lox.
296 /// @param domain The domain.
297 /// @param verbosity The verbosity.
298 ALIB_DLL static
299 void Entry( LoxImpl* impl, const NString& domain, Verbosity verbosity );
300
301 /// Implementation of the method \alib{lox;Lox::IsActive}.
302 ///
303 /// @param impl The implementation struct of the \b Lox.
304 /// @param verbosity The verbosity to query for activity.
305 /// @param domain The log domain. All rules for resolving the effective log domain
306 /// apply as with normal log statements.
307 /// @param resultDomain An optional pointer to an \b AString. If given, the resulting
308 /// domain is appended to the string.
309 /// (The domain that results from the optional \p{domain} and all \alox
310 /// rules that apply at the place of invocation).
311 /// @return The number of active loggers.
312 ALIB_DLL static
313 int IsActive( LoxImpl* impl, Verbosity verbosity, const NString& domain,
314 NAString* resultDomain );
315
316//##################################################################################################
317// Debug methods
318//##################################################################################################
319#if ALIB_DEBUG_MEMORY
320 //==============================================================================================
321 /// Implementation of the method \alib{lox;Lox::DbgGetMonoAllocator}.
322 /// @param impl The implementation struct of the \b Lox.
323 /// @return The monotonic allocator of this \b Lox.
324 //==============================================================================================
325 ALIB_DLL static
327#endif
328
329
330//##################################################################################################
331// internals
332//##################################################################################################
333
334 /// Assembles the resulting domain from the given \p{domainPath} and the Scope Domain paths
335 /// (see #SetDomain) according to the scope identified by \p{scopeInfo}.
336 /// The resulting full domain string is assembled from inner to outer scope.
337 /// If \p{domainPath}, respectively as soon as any of the Scope Domain's paths
338 /// start with the character defined with
339 /// \ref alib::lox::detail::Domain::Separator "Domain::Separator",
340 /// the evaluation is stopped (the path is interpreted as absolute).
341 ///
342 /// @param impl The implementation struct of the \b Lox.
343 /// @param domainPath The domain path. If starting with the character defined with
344 /// \ref alib::lox::detail::Domain::Separator "Domain::Separator",
345 /// no scope domains are applied.
346 /// @return The resulting \ref alib::lox::detail::Domain "Domain".
347 ALIB_DLL static
348 detail::Domain* evaluateResultDomain( LoxImpl* impl, const NString& domainPath );
349
350 /// Invokes \b Find on the given domain and logs internal message when the domain was
351 /// not known before.
352 ///
353 /// @param impl The implementation struct of the \b Lox.
354 /// @param domainSystem The domain system. Either the standard or the internal one.
355 /// @param domainPath The domain path.
356 /// @return The resulting \ref alib::lox::detail::Domain "Domain".
357 ALIB_DLL static
358 detail::Domain* findDomain( LoxImpl* impl,
359 detail::Domain& domainSystem,
360 NString domainPath );
361
362 /// This method is looping over the \e Loggers, checking their verbosity against the given
363 /// one, and, if they match, invoke the log method of the \e Logger.
364 /// With the first logger identified to be active, the <em>Prefix Objects</em> get
365 /// collected from the scope store.
366 /// @param impl The implementation struct of the \b Lox.
367 /// @param dom The domain to log on
368 /// @param verbosity The verbosity.
369 /// @param logables The objects to log.
370 /// @param prefixes Denotes if prefixes should be included or not.
371 ALIB_DLL static
372 void log( LoxImpl* impl,
373 detail::Domain* dom,
374 Verbosity verbosity,
375 BoxesMA& logables,
376 lang::Inclusion prefixes );
377
378
379 /// Logs an internal error message using the internal domain tree as defined in
380 /// \ref alib::lox::Lox::InternalDomains "Lox::InternalDomains".
381 ///
382 /// @param impl The implementation struct of the \b Lox.
383 /// @param verbosity The verbosity.
384 /// @param subDomain The subdomain of the internal domain to log into.
385 /// @param msg The message.
386 ALIB_DLL static
387 void logInternal( LoxImpl* impl, Verbosity verbosity, const NString& subDomain,
388 BoxesMA& msg );
389
390 /// Overloaded version accepting a string to log.
391 ///
392 /// @param impl The implementation struct of the \b Lox.
393 /// @param verbosity The verbosity.
394 /// @param subDomain The subdomain of the internal domain to log into.
395 /// @param msg The message.
396 ALIB_DLL static
397 void logInternal( LoxImpl* impl, Verbosity verbosity, const NString& subDomain,
398 const NString& msg );
399
400 /// Returns a reference to a list of boxes to be used by internal logging.
401 /// Each invocation has to be followed by an invocation to #logInternal
402 /// which releases the logables.
403 ///
404 /// @param impl The implementation struct of the \b Lox.
405 /// @return A list of boxes.
406 ALIB_DLL static
408
409 /// Implementation of the interface method fetching all possible parameters.
410 ///
411 /// @param impl The implementation struct of the \b Lox.
412 /// @param scopeDomain The domain path to register.
413 /// @param scope The scope that the given \p{domain} should be registered for.
414 /// Available Scope definitions are platform/language dependent.
415 /// @param removeNTRSD Used to remove a named thread-related Scope Domain (and is true only
416 /// when invoked by interface method #RemoveThreadDomain.
417 /// @param thread The thread to set/unset a thread-related Scope Domain for.
418 ALIB_DLL static
419 void setDomain( LoxImpl* impl, const NString& scopeDomain, Scope scope,
420 bool removeNTRSD, threads::Thread* thread );
421
422 /// Implementation of the interface method fetching all possible parameters.
423 ///
424 /// @param impl The implementation struct of the \b Lox.
425 /// @param prefix The <em>Prefix Logable</em> to set.
426 /// @param scope The scope that the given \p{logable} should be registered for.
427 /// Available Scope definitions are platform/language dependent.
428 /// @param thread The thread to set/unset a thread-related <em>Prefix Logable</em> for.
429 ALIB_DLL static
430 void setPrefix( LoxImpl* impl, const Box& prefix, Scope scope, threads::Thread* thread );
431
432 /// Increases the internal log counter of \p{impl}.
433 /// @param impl The implementation struct of the \b Lox.
434 ALIB_DLL static
435 void IncreaseLogCounter( LoxImpl* impl);
436
437 /// Implementation of the method \alib{lox;Lox::EntryDetectDomain}.
438 ///
439 /// @param impl The implementation struct of the \b Lox.
440 /// @param verbosity The verbosity.
441 ALIB_DLL static
442 void entryDetectDomainImpl( LoxImpl* impl, Verbosity verbosity);
443
444 /// Internal method serving public interface \alib{lox;Lox::Once}.
445 ///
446 /// @param impl The implementation struct of the \b Lox.
447 /// @param domain Optional <em>Log Domain</em> which is combined with
448 /// <em>%Scope Domains</em> set for the \e %Scope of invocation.
449 /// @param verbosity The verbosity of the <em>Log Statement</em> (if performed).
450 /// @param logables The objects to log (Multiple objects may be provided within
451 /// container class Boxes.)
452 /// @param pGroup The optional name of the statement group. If used, all statements that
453 /// share the same group name are working on the same counter (according
454 /// to the \p{scope}.)
455 /// If omitted (or empty or nullptr), the counter is bound to the
456 /// \e %Scope provided. If omitted and \p{scope} is Scope::Global, then the
457 /// counter is associated exclusively with the single <em>Log Statement</em>
458 /// itself.
459 /// @param scope The \e %Scope that the group or counter is bound to.
460 /// @param quantity The number of logs to be performed. As the name of the method indicates,
461 /// this defaults to \c 1.
462 ALIB_DLL static
463 void once( LoxImpl* impl , const NString& domain, Verbosity verbosity,
464 const Box& logables, const String& pGroup, Scope scope,
465 int quantity );
466
467 /// Internal method serving public interface \alib{lox;Lox::Store}.
468 ///
469 /// @param impl The implementation struct of the \b Lox.
470 /// @param data The data object to store.
471 /// In C++, has to be heap allocated and will be deleted
472 /// by this \b %Lox when overwritten or this lox is deleted.
473 /// @param pKey The key to the data.
474 /// @param scope The \e %Scope that the data is bound to.
475 ALIB_DLL static
476 void store( LoxImpl* impl, const Box& data, const NString& pKey, Scope scope );
477
478 /// Internal method serving public interface \alib{lox;Lox::Retrieve}.
479 ///
480 /// @param impl The implementation struct of the \b Lox.
481 /// @param pKey The key to the data.
482 /// @param scope The \e %Scope that the data is bound to.
483 /// @return The data, a \e nulled box if no value was found.
484 ALIB_DLL static
485 Box retrieve( LoxImpl* impl, const NString& pKey, Scope scope );
486
487 /// Checks if given scope is thread-related.
488 ///
489 /// @param impl The implementation struct of the \b Lox.
490 /// @param scope The scope that is to be checked.
491 /// @return \c true if \p{scope} is thread-related, \c false else.
492 ALIB_DLL static
493 bool isThreadRelatedScope( LoxImpl* impl, Scope scope );
494
495 /// Checks if given scope needs information that is not available. In addition, the
496 /// in/out parameter \p{scope} is changed to \b Scope::Path, in case a level was added.
497 ///
498 /// @param impl The implementation struct of the \b Lox.
499 /// @param[in,out] scope A reference to the scope that is to be checked (and eventually
500 /// modified.
501 /// @param internalDomain The internal subdomain to log any error/warning into.
502 /// @return A positive value providing the path level deduced from \p{scope} if all is fine,
503 /// \c -1 else.
504 ALIB_DLL static
505 int checkScopeInformation( LoxImpl* impl , Scope& scope,
506 const NString& internalDomain );
507
508 /// Used on construction and with #Reset.
509 /// @param impl The implementation struct of the \b Lox.
510 ALIB_DLL static
511 void init(LoxImpl* impl);
512
513 /// Reads the verbosity for the given logger and domain from the \alib variable system.
514 /// This internal method is used in two occasions:
515 /// - when a new logger is added: recursively for all existing domains (\p{configStr} is
516 /// given)
517 /// - when a new domain is created on the fly(\p{configStr} is not given)
518 ///
519 /// The variable is already read and found in an internal instance.
520 ///
521 /// @param impl The implementation struct of the \b Lox.
522 /// @param variable The loaded variable with verbosity information.
523 /// @param logger The logger to set the verbosity for.
524 /// @param dom The domain to set the verbosity for.
525 ALIB_DLL static
526 void getVerbosityFromConfig( LoxImpl* impl,
527 variables::Variable& variable,
528 detail::Logger* logger,
529 detail::Domain& dom );
530
531 /// Reads a prefix string from the \alib variable system.
532 /// This internal method is used when a new domain is created,
533 ///
534 /// @param impl The implementation struct of the \b Lox.
535 /// @param dom The domain to set the verbosity for.
536 ALIB_DLL static
537 void getDomainPrefixFromConfig( LoxImpl* impl, detail::Domain& dom );
538
539
540 /// Reads the verbosity for the given logger and domain from the \alib variable system.
541 /// This internal method is used when a new logger is added.
542 /// Walks recursively for all existing domains.
543 ///
544 /// @param impl The implementation struct of the \b Lox.
545 /// @param variable The loaded variable with verbosity information.
546 /// @param logger The logger to set the verbosity for.
547 /// @param dom The domain to set the verbosity for.
548 ALIB_DLL static
549 void getAllVerbosities( LoxImpl* impl, variables::Variable& variable,
550 detail::Logger* logger, detail::Domain& dom );
551
552 /// Implements functionality for configuration variable \c LOXNAME_DUMP_STATE_ON_EXIT.
553 /// Is called when a logger is removed.
554 /// @param impl The implementation struct of the \b Lox.
555 ALIB_DLL static
556 void dumpStateOnLoggerRemoval(LoxImpl* impl);
557
558 /// Implements functionality for configuration variable \c LOXNAME_LOGGERNAME_VERBOSITY.
559 /// Is called when a logger is removed.
560 /// @param impl The implementation struct of the \b Lox.
561 /// @param logger The logger to write the verbosity for.
562 ALIB_DLL static
563 void writeVerbositiesOnLoggerRemoval( LoxImpl* impl, Logger* logger );
564
565#if !ALIB_SINGLE_THREADED
566 /// Returns the internal lock.
567 /// @param impl The implementation struct of the \b Lox.
568 /// @returns The internal \b RecursiveLock of this \b %Lox.
569 ALIB_DLL static
571#endif
572
573}; // struct LI
574
575}}} // namespace [alib::lox::detail]
576
578 ALIB_COMMA alib::variables::Priority> , vt_lox_pair_verby_prio )
#define ALIB_DLL
Definition alib.inl:503
#define ALIB_BOXING_VTABLE_DECLARE(TMapped, Identifier)
#define ALIB_EXPORT
Definition alib.inl:497
#define ALIB_COMMA
Definition alib.inl:963
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
lang::integer integer
Type alias in namespace alib.
Definition integers.inl:149
strings::TString< nchar > NString
Type alias in namespace alib.
Definition string.inl:2198
strings::TAString< nchar, lang::HeapAllocator > NAString
Type alias in namespace alib.
monomem::TMonoAllocator< lang::HeapAllocator > MonoAllocator
strings::TCString< nchar > NCString
Type alias in namespace alib.
Definition cstring.inl:484
alib::variables::Priority Priority
Type alias in namespace alib.
boxing::Box Box
Type alias in namespace alib.
Definition box.inl:1149
boxing::TBoxes< MonoAllocator > BoxesMA
Type alias in namespace alib.
Definition boxes.inl:193
strings::TString< character > String
Type alias in namespace alib.
Definition string.inl:2189
time::Ticks Ticks
Type alias in namespace alib.
Definition ticks.inl:79
static ALIB_DLL void SetFileNameCacheCapacity(LoxImpl *impl, integer numberOfLists, integer entriesPerList)
static ALIB_DLL void entryDetectDomainImpl(LoxImpl *impl, Verbosity verbosity)
static ALIB_DLL void MapThreadName(LoxImpl *impl, const String &threadName, threads::ThreadID id)
static ALIB_DLL void logInternal(LoxImpl *impl, Verbosity verbosity, const NString &subDomain, const NString &msg)
static ALIB_DLL void logInternal(LoxImpl *impl, Verbosity verbosity, const NString &subDomain, BoxesMA &msg)
static ALIB_DLL void once(LoxImpl *impl, const NString &domain, Verbosity verbosity, const Box &logables, const String &pGroup, Scope scope, int quantity)
static ALIB_DLL threads::RecursiveLock & getLock(LoxImpl *impl)
static ALIB_DLL const NString & GetName(LoxImpl *impl)
static ALIB_DLL void Release(LoxImpl *impl)
static ALIB_DLL detail::Domain * findDomain(LoxImpl *impl, detail::Domain &domainSystem, NString domainPath)
static ALIB_DLL void SetSourcePathTrimRule(LoxImpl *impl, const NCString &path, lang::Inclusion includeString, int trimOffset, lang::Case sensitivity, const NString &trimReplacement, lang::Reach reach, Priority priority)
static ALIB_DLL void GetState(LoxImpl *impl, NAString &buf, StateInfo flags)
static ALIB_DLL void writeVerbositiesOnLoggerRemoval(LoxImpl *impl, Logger *logger)
static ALIB_DLL void IncreaseLogCounter(LoxImpl *impl)
static ALIB_DLL void SetStartTime(LoxImpl *impl, time_t startTime, const NString &loggerName)
static ALIB_DLL integer & GetLogCounter(LoxImpl *impl)
static ALIB_DLL void SetDomain(LoxImpl *impl, const NString &scopeDomain, Scope scope, threads::Thread *thread)
static ALIB_DLL BoxesMA & GetLogableContainer(LoxImpl *impl)
static ALIB_DLL void Acquire(LoxImpl *impl, const lang::CallerInfo &ci)
static ALIB_DLL void SetVerbosity(LoxImpl *impl, detail::Logger *logger, Verbosity verbosity, const NString &domain, Priority priority)
static ALIB_DLL void SetPrefix(LoxImpl *impl, const Box &prefix, const NString &domain, lang::Inclusion otherPLs)
static ALIB_DLL void getDomainPrefixFromConfig(LoxImpl *impl, detail::Domain &dom)
static ALIB_DLL Box retrieve(LoxImpl *impl, const NString &pKey, Scope scope)
static ALIB_DLL void Reset(LoxImpl *impl)
static ALIB_DLL void setPrefix(LoxImpl *impl, const Box &prefix, Scope scope, threads::Thread *thread)
static ALIB_DLL void Destruct(LoxImpl *lox)
static ALIB_DLL void store(LoxImpl *impl, const Box &data, const NString &pKey, Scope scope)
static ALIB_DLL detail::Domain * evaluateResultDomain(LoxImpl *impl, const NString &domainPath)
static ALIB_DLL void SetStartTime(LoxImpl *impl, const FILETIME &startTime, const NString &loggerName)
static ALIB_DLL void SetVerbosity(LoxImpl *impl, const NString &loggerName, Verbosity verbosity, const NString &domain, Priority priority)
static ALIB_DLL bool RemoveLogger(LoxImpl *impl, detail::Logger *logger)
static ALIB_DLL BoxesMA & acquireInternalLogables(LoxImpl *impl)
static ALIB_DLL void SetStartTime(LoxImpl *impl, Ticks startTime, const NString &loggerName)
ALIB_DLL void Reset()
static ALIB_DLL int checkScopeInformation(LoxImpl *impl, Scope &scope, const NString &internalDomain)
static ALIB_DLL LoxImpl * Construct(const NString &name)
static ALIB_DLL detail::Logger * RemoveLogger(LoxImpl *impl, const NString &loggerName)
static ALIB_DLL void setDomain(LoxImpl *impl, const NString &scopeDomain, Scope scope, bool removeNTRSD, threads::Thread *thread)
static ALIB_DLL int IsActive(LoxImpl *impl, Verbosity verbosity, const NString &domain, NAString *resultDomain)
static ALIB_DLL void dumpStateOnLoggerRemoval(LoxImpl *impl)
static ALIB_DLL void Entry(LoxImpl *impl, const NString &domain, Verbosity verbosity)
static ALIB_DLL void RemoveThreadDomain(LoxImpl *impl, const NString &scopeDomain, Scope scope, threads::Thread *thread)
static ALIB_DLL void State(LoxImpl *impl, const NString &domain, Verbosity verbosity, const String &headLine, StateInfo flags)
static ALIB_DLL bool isThreadRelatedScope(LoxImpl *impl, Scope scope)
static ALIB_DLL void init(LoxImpl *impl)
static ALIB_DLL void SetDomainSubstitutionRule(LoxImpl *impl, const NString &domainPath, const NString &replacement)
static ALIB_DLL MonoAllocator & DbgGetMonoAllocator(LoxImpl *impl)
static ALIB_DLL detail::Logger * GetLogger(LoxImpl *impl, const NString &loggerName)
static ALIB_DLL void log(LoxImpl *impl, detail::Domain *dom, Verbosity verbosity, BoxesMA &logables, lang::Inclusion prefixes)
static ALIB_DLL void getVerbosityFromConfig(LoxImpl *impl, variables::Variable &variable, detail::Logger *logger, detail::Domain &dom)
static ALIB_DLL void getAllVerbosities(LoxImpl *impl, variables::Variable &variable, detail::Logger *logger, detail::Domain &dom)