[#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&period;

== Synopsis

Declared in `&lt;ball&lowbar;loggermanager&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class LoggerManager;
----

== Description

This class is _usually_ a singleton&period; It provides a factory for `Logger` objects and is also a wrapper for category administration services&period; Note that some services provided by this class are available only after the singleton has been initialized&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/LoggerManager/AttributeCollector.adoc[`AttributeCollector`] 
| `AttributeCollector` is the type of a user&hyphen;supplied functor used to visit a collection of attributes&period;
| xref:BloombergLP/ball/LoggerManager/AttributeVisitor.adoc[`AttributeVisitor`] 
| `AttributeVisitor` is the type of a user&hyphen;supplied functor invoked by an attribute collector for every attribute&period;
| xref:BloombergLP/ball/LoggerManager/CategoryNameFilterCallback.adoc[`CategoryNameFilterCallback`] 
| `CategoryNameFilterCallback` is the type of the user&hyphen;supplied functor that translates external category names to internal names&period;
| xref:BloombergLP/ball/LoggerManager/DefaultThresholdLevelsCallback.adoc[`DefaultThresholdLevelsCallback`] 
| Functor that determines default threshold levels for new categories&period;
| xref:BloombergLP/ball/LoggerManager/ObserverRegistry.adoc[`ObserverRegistry`] 
| This `typedef` is an alias for the type of the internal broadcast observer registry&period;
| xref:BloombergLP/ball/LoggerManager/PublishAllTriggerCallback.adoc[`PublishAllTriggerCallback`] 
| Functor invoked to publish all active loggers&apos; record buffers&period;
| xref:BloombergLP/ball/LoggerManager/UserFieldsPopulatorCallback-05.adoc[`UserFieldsPopulatorCallback`] 
| `UserFieldsPopulatorCallback` is the type of a user&hyphen;supplied callback functor used to populate the user&hyphen;defined fields in each log record&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/LoggerManager/2constructor.adoc[`LoggerManager`]         [.small]#[constructor]#
| Create a logger manager with the specified configuration&period;
| xref:BloombergLP/ball/LoggerManager/2destructor.adoc[`&#126;LoggerManager`] [.small]#[destructor]#
| Destroy this logger manager&period;
| xref:BloombergLP/ball/LoggerManager/addCategory.adoc[`addCategory`] 
| Add a category with the specified name and threshold levels&period;
| xref:BloombergLP/ball/LoggerManager/addCategoryHierarchically.adoc[`addCategoryHierarchically`] 
| Add a new category, inheriting thresholds hierarchically&period;
| xref:BloombergLP/ball/LoggerManager/addRule.adoc[`addRule`] 
| Add a rule having the specified `value`&period;
| xref:BloombergLP/ball/LoggerManager/addRules.adoc[`addRules`] 
| Add each rule in the specified `ruleSet`&period;
| 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&period;
| xref:BloombergLP/ball/LoggerManager/deallocateLogger.adoc[`deallocateLogger`] 
| Deallocate the specified logger and release it from management&period;
| 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&period;
| xref:BloombergLP/ball/LoggerManager/defaultRecordThresholdLevel.adoc[`defaultRecordThresholdLevel`] 
| Return the default record threshold level of this logger manager&period;
| xref:BloombergLP/ball/LoggerManager/defaultThresholdLevels.adoc[`defaultThresholdLevels`] 
| Return the default threshold levels associated with this logger manager object&period;
| xref:BloombergLP/ball/LoggerManager/defaultTriggerAllThresholdLevel.adoc[`defaultTriggerAllThresholdLevel`] 
| Return the default trigger&hyphen;all threshold level of this logger manager&period;
| xref:BloombergLP/ball/LoggerManager/defaultTriggerThresholdLevel.adoc[`defaultTriggerThresholdLevel`] 
| Return the default trigger threshold level of this logger manager&period;
| xref:BloombergLP/ball/LoggerManager/deregisterAllObservers.adoc[`deregisterAllObservers`] 
| Remove all observers from the registry of observers maintained by this logger manager&period;
| xref:BloombergLP/ball/LoggerManager/deregisterAttributeCollector.adoc[`deregisterAttributeCollector`] 
| Remove the named attribute collector from the registry&period;
| xref:BloombergLP/ball/LoggerManager/deregisterObserver.adoc[`deregisterObserver`] 
| Remove the named observer from the registry&period;
| xref:BloombergLP/ball/LoggerManager/findObserver-0f.adoc[`findObserver`] 
| `findObserver` overloads
| xref:BloombergLP/ball/LoggerManager/getLogger.adoc[`getLogger`] 
| Return a non&hyphen;`const` reference to a logger managed by this logger manager suitable for performing logging operations for this thread of execution&period;
| xref:BloombergLP/ball/LoggerManager/isCategoryEnabled.adoc[`isCategoryEnabled`] 
| Return whether logging at the specified severity is enabled&period;
| 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&period;
| xref:BloombergLP/ball/LoggerManager/numCategories.adoc[`numCategories`] 
| Return the number of categories in the category registry of this logger manager&period;
| 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&period;
| xref:BloombergLP/ball/LoggerManager/registerAttributeCollector.adoc[`registerAttributeCollector`] 
| Register the specified `collector` under `collectorName`&period;
| xref:BloombergLP/ball/LoggerManager/registerObserver.adoc[`registerObserver`] 
| Register the specified `observer` under `observerName`&period;
| xref:BloombergLP/ball/LoggerManager/removeAllRules.adoc[`removeAllRules`] 
| Remove every rule from the set of rules maintained by this object&period;
| xref:BloombergLP/ball/LoggerManager/removeRule.adoc[`removeRule`] 
| Remove the rule having the specified `value`&period;
| xref:BloombergLP/ball/LoggerManager/removeRules.adoc[`removeRules`] 
| Remove each rule in the specified `ruleSet`&period;
| xref:BloombergLP/ball/LoggerManager/resetDefaultThresholdLevels.adoc[`resetDefaultThresholdLevels`] 
| Reset the default threshold levels of this logger manager to the original &quot;factory&hyphen;supplied&quot; default values or the factory overrides supplied at construction&period;
| xref:BloombergLP/ball/LoggerManager/ruleSet.adoc[`ruleSet`] 
| Return a `const` reference to the rule set maintained by this object&period;
| 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&period;
| xref:BloombergLP/ball/LoggerManager/setCategoryThresholdsToFactoryDefaults.adoc[`setCategoryThresholdsToFactoryDefaults`] 
| Set `category` thresholds to the factory default values&period;
| xref:BloombergLP/ball/LoggerManager/setDefaultThresholdLevels.adoc[`setDefaultThresholdLevels`] 
| Set the default threshold levels&period;
| xref:BloombergLP/ball/LoggerManager/setDefaultThresholdLevelsCallback.adoc[`setDefaultThresholdLevelsCallback`] 
| Set the default&hyphen;thresholds callback&period;
| xref:BloombergLP/ball/LoggerManager/setLogger.adoc[`setLogger`] 
| Set this thread&apos;s default logger to the specified logger&period;
| xref:BloombergLP/ball/LoggerManager/setMaxNumCategories.adoc[`setMaxNumCategories`] 
| Set the category registry capacity&period;
| xref:BloombergLP/ball/LoggerManager/setThresholdLevelsHierarchically.adoc[`setThresholdLevelsHierarchically`] 
| Set thresholds for categories matching `categoryNamePrefix`&period;
| xref:BloombergLP/ball/LoggerManager/thresholdLevelsForNewCategory.adoc[`thresholdLevelsForNewCategory`] 
| Load the threshold levels that would apply to a new category&period;
| xref:BloombergLP/ball/LoggerManager/userFieldsPopulatorCallback-0c.adoc[`userFieldsPopulatorCallback`] 
| Return the address of the non&hyphen;modifiable user populator functor registered with this logger manager, or 0 if there is no registered user populator functor&period;
| 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`&period;
|===


== 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&period;
| 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&period;
| xref:BloombergLP/ball/LoggerManager/logMessage.adoc[`logMessage`] 
| Publish and dispose of a record via the platform default handler&period;
| 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&period;
| xref:BloombergLP/ball/LoggerManager/singleton.adoc[`singleton`] 
| Return a non&hyphen;`const` reference to the logger manager singleton&period; The behavior is undefined unless the logger manager singleton exists&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/ball/LoggerManagerCategoryManip.adoc[BloombergLP::ball::LoggerManagerCategoryManip]`
| Iterator providing modifiable access to logger manager categories&period;
| `xref:BloombergLP/ball/LoggerManagerCategoryIter.adoc[BloombergLP::ball::LoggerManagerCategoryIter]`
| Iterator providing read&hyphen;only access to logger manager categories&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
