[#BloombergLP-ball-LoggerManager] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::LoggerManager :relfileprefix: ../../ :mrdocs: This class is usually a singleton factory for `Logger` objects. == Synopsis Declared in `<ball_loggermanager.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class LoggerManager; ---- == Description This class is _usually_ a singleton. It provides a factory for `Logger` objects and is also a wrapper for category administration services. Note that some services provided by this class are available only after the singleton has been initialized. == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/LoggerManager/AttributeCollector.adoc[`AttributeCollector`] | `AttributeCollector` is the type of a user‐supplied functor used to visit a collection of attributes. | xref:BloombergLP/ball/LoggerManager/AttributeVisitor.adoc[`AttributeVisitor`] | `AttributeVisitor` is the type of a user‐supplied functor invoked by an attribute collector for every attribute. | xref:BloombergLP/ball/LoggerManager/CategoryNameFilterCallback.adoc[`CategoryNameFilterCallback`] | `CategoryNameFilterCallback` is the type of the user‐supplied functor that translates external category names to internal names. | xref:BloombergLP/ball/LoggerManager/DefaultThresholdLevelsCallback.adoc[`DefaultThresholdLevelsCallback`] | Functor that determines default threshold levels for new categories. | xref:BloombergLP/ball/LoggerManager/ObserverRegistry.adoc[`ObserverRegistry`] | This `typedef` is an alias for the type of the internal broadcast observer registry. | xref:BloombergLP/ball/LoggerManager/PublishAllTriggerCallback.adoc[`PublishAllTriggerCallback`] | Functor invoked to publish all active loggers' record buffers. | xref:BloombergLP/ball/LoggerManager/UserFieldsPopulatorCallback-05.adoc[`UserFieldsPopulatorCallback`] | `UserFieldsPopulatorCallback` is the type of a user‐supplied callback functor used to populate the user‐defined fields in each log record. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/LoggerManager/2constructor.adoc[`LoggerManager`] [.small]#[constructor]# | Create a logger manager with the specified configuration. | xref:BloombergLP/ball/LoggerManager/2destructor.adoc[`~LoggerManager`] [.small]#[destructor]# | Destroy this logger manager. | xref:BloombergLP/ball/LoggerManager/addCategory.adoc[`addCategory`] | Add a category with the specified name and threshold levels. | xref:BloombergLP/ball/LoggerManager/addCategoryHierarchically.adoc[`addCategoryHierarchically`] | Add a new category, inheriting thresholds hierarchically. | xref:BloombergLP/ball/LoggerManager/addRule.adoc[`addRule`] | Add a rule having the specified `value`. | xref:BloombergLP/ball/LoggerManager/addRules.adoc[`addRules`] | Add each rule in the specified `ruleSet`. | xref:BloombergLP/ball/LoggerManager/allocateLogger-0e.adoc[`allocateLogger`] | `allocateLogger` overloads | xref:BloombergLP/ball/LoggerManager/allocator.adoc[`allocator`] | Return the address of the modifiable allocator held by this logger manager. | xref:BloombergLP/ball/LoggerManager/deallocateLogger.adoc[`deallocateLogger`] | Deallocate the specified logger and release it from management. | xref:BloombergLP/ball/LoggerManager/defaultCategory-05.adoc[`defaultCategory`] | `defaultCategory` overloads | xref:BloombergLP/ball/LoggerManager/defaultPassThresholdLevel.adoc[`defaultPassThresholdLevel`] | Return the default pass threshold level of this logger manager. | xref:BloombergLP/ball/LoggerManager/defaultRecordThresholdLevel.adoc[`defaultRecordThresholdLevel`] | Return the default record threshold level of this logger manager. | xref:BloombergLP/ball/LoggerManager/defaultThresholdLevels.adoc[`defaultThresholdLevels`] | Return the default threshold levels associated with this logger manager object. | xref:BloombergLP/ball/LoggerManager/defaultTriggerAllThresholdLevel.adoc[`defaultTriggerAllThresholdLevel`] | Return the default trigger‐all threshold level of this logger manager. | xref:BloombergLP/ball/LoggerManager/defaultTriggerThresholdLevel.adoc[`defaultTriggerThresholdLevel`] | Return the default trigger threshold level of this logger manager. | xref:BloombergLP/ball/LoggerManager/deregisterAllObservers.adoc[`deregisterAllObservers`] | Remove all observers from the registry of observers maintained by this logger manager. | xref:BloombergLP/ball/LoggerManager/deregisterAttributeCollector.adoc[`deregisterAttributeCollector`] | Remove the named attribute collector from the registry. | xref:BloombergLP/ball/LoggerManager/deregisterObserver.adoc[`deregisterObserver`] | Remove the named observer from the registry. | xref:BloombergLP/ball/LoggerManager/findObserver-0f.adoc[`findObserver`] | `findObserver` overloads | xref:BloombergLP/ball/LoggerManager/getLogger.adoc[`getLogger`] | Return a non‐`const` reference to a logger managed by this logger manager suitable for performing logging operations for this thread of execution. | xref:BloombergLP/ball/LoggerManager/isCategoryEnabled.adoc[`isCategoryEnabled`] | Return whether logging at the specified severity is enabled. | xref:BloombergLP/ball/LoggerManager/lookupCategory-0e.adoc[`lookupCategory`] | `lookupCategory` overloads | xref:BloombergLP/ball/LoggerManager/maxNumCategories.adoc[`maxNumCategories`] | Return the current capacity of the category registry. | xref:BloombergLP/ball/LoggerManager/numCategories.adoc[`numCategories`] | Return the number of categories in the category registry of this logger manager. | xref:BloombergLP/ball/LoggerManager/observer-09.adoc[`observer`] | `observer` overloads | xref:BloombergLP/ball/LoggerManager/publishAll.adoc[`publishAll`] | Publish all buffered records from all managed loggers. | xref:BloombergLP/ball/LoggerManager/registerAttributeCollector.adoc[`registerAttributeCollector`] | Register the specified `collector` under `collectorName`. | xref:BloombergLP/ball/LoggerManager/registerObserver.adoc[`registerObserver`] | Register the specified `observer` under `observerName`. | xref:BloombergLP/ball/LoggerManager/removeAllRules.adoc[`removeAllRules`] | Remove every rule from the set of rules maintained by this object. | xref:BloombergLP/ball/LoggerManager/removeRule.adoc[`removeRule`] | Remove the rule having the specified `value`. | xref:BloombergLP/ball/LoggerManager/removeRules.adoc[`removeRules`] | Remove each rule in the specified `ruleSet`. | xref:BloombergLP/ball/LoggerManager/resetDefaultThresholdLevels.adoc[`resetDefaultThresholdLevels`] | Reset the default threshold levels of this logger manager to the original "factory‐supplied" default values or the factory overrides supplied at construction. | xref:BloombergLP/ball/LoggerManager/ruleSet.adoc[`ruleSet`] | Return a `const` reference to the rule set maintained by this object. | xref:BloombergLP/ball/LoggerManager/setCategory-07f.adoc[`setCategory`] | `setCategory` overloads | xref:BloombergLP/ball/LoggerManager/setCategoryThresholdsToCurrentDefaults.adoc[`setCategoryThresholdsToCurrentDefaults`] | Set `category` thresholds to the current default values. | xref:BloombergLP/ball/LoggerManager/setCategoryThresholdsToFactoryDefaults.adoc[`setCategoryThresholdsToFactoryDefaults`] | Set `category` thresholds to the factory default values. | xref:BloombergLP/ball/LoggerManager/setDefaultThresholdLevels.adoc[`setDefaultThresholdLevels`] | Set the default threshold levels. | xref:BloombergLP/ball/LoggerManager/setDefaultThresholdLevelsCallback.adoc[`setDefaultThresholdLevelsCallback`] | Set the default‐thresholds callback. | xref:BloombergLP/ball/LoggerManager/setLogger.adoc[`setLogger`] | Set this thread's default logger to the specified logger. | xref:BloombergLP/ball/LoggerManager/setMaxNumCategories.adoc[`setMaxNumCategories`] | Set the category registry capacity. | xref:BloombergLP/ball/LoggerManager/setThresholdLevelsHierarchically.adoc[`setThresholdLevelsHierarchically`] | Set thresholds for categories matching `categoryNamePrefix`. | xref:BloombergLP/ball/LoggerManager/thresholdLevelsForNewCategory.adoc[`thresholdLevelsForNewCategory`] | Load the threshold levels that would apply to a new category. | xref:BloombergLP/ball/LoggerManager/userFieldsPopulatorCallback-0c.adoc[`userFieldsPopulatorCallback`] | Return the address of the non‐modifiable user populator functor registered with this logger manager, or 0 if there is no registered user populator functor. | xref:BloombergLP/ball/LoggerManager/visitCategories-0d.adoc[`visitCategories`] | `visitCategories` overloads | xref:BloombergLP/ball/LoggerManager/visitObservers-06.adoc[`visitObservers`] | Visit each registered observer with the specified `visitor`. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/LoggerManager/createLoggerManager-05.adoc[`createLoggerManager`] | `createLoggerManager` overloads | xref:BloombergLP/ball/LoggerManager/getRecord.adoc[`getRecord`] | Return a modifiable record allocated from the default allocator. | xref:BloombergLP/ball/LoggerManager/initSingleton-01.adoc[`initSingleton`] | `initSingleton` overloads | xref:BloombergLP/ball/LoggerManager/isInitialized.adoc[`isInitialized`] | Return `true` if the logger manager singleton exists, and `false` otherwise. | xref:BloombergLP/ball/LoggerManager/logMessage.adoc[`logMessage`] | Publish and dispose of a record via the platform default handler. | xref:BloombergLP/ball/LoggerManager/obtainMessageBuffer-01.adoc[`obtainMessageBuffer`] | `obtainMessageBuffer` overloads | xref:BloombergLP/ball/LoggerManager/shutDownSingleton.adoc[`shutDownSingleton`] | Destroy the logger manager singleton and release its resources. | xref:BloombergLP/ball/LoggerManager/singleton.adoc[`singleton`] | Return a non‐`const` reference to the logger manager singleton. The behavior is undefined unless the logger manager singleton exists. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/ball/LoggerManagerCategoryManip.adoc[BloombergLP::ball::LoggerManagerCategoryManip]` | Iterator providing modifiable access to logger manager categories. | `xref:BloombergLP/ball/LoggerManagerCategoryIter.adoc[BloombergLP::ball::LoggerManagerCategoryIter]` | Iterator providing read‐only access to logger manager categories. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#