[#BloombergLP-ball-Administration] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::Administration :relfileprefix: ../../ :mrdocs: This `struct` provides a namespace for a suite of utility functions that simplifies administration of the `ball` logging subsystem, and insulates administrative clients from changes to lower‐level components of the `ball` package. A precondition common to all of the utility functions is that the logger manager singleton must be initialized and not in the process of being shut down. == Synopsis Declared in `<ball_administration.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct Administration; ---- == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/Administration/addCategory.adoc[`addCategory`] | Add to the registry of the logger manager singleton a new category having the specified `categoryName` and the specified `recordLevel`, `passLevel`, `triggerLevel`, and `triggerAllLevel` threshold levels, respectively, if (1) `categoryName` is not present in the category registry, (2) the number of categories in the registry is less than the registry capacity, and (3) each of the level values is in the range `[0 .. 255]`. Return 0 on success, and a non‐zero value otherwise. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down. | xref:BloombergLP/ball/Administration/defaultPassThresholdLevel.adoc[`defaultPassThresholdLevel`] | Return the default pass threshold level. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down. | xref:BloombergLP/ball/Administration/defaultRecordThresholdLevel.adoc[`defaultRecordThresholdLevel`] | Return the default record threshold level. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down. | xref:BloombergLP/ball/Administration/defaultTriggerAllThresholdLevel.adoc[`defaultTriggerAllThresholdLevel`] | Return the default trigger‐all threshold level. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down. | xref:BloombergLP/ball/Administration/defaultTriggerThresholdLevel.adoc[`defaultTriggerThresholdLevel`] | Return the default trigger threshold level. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down. | xref:BloombergLP/ball/Administration/maxNumCategories.adoc[`maxNumCategories`] | Return the current capacity of the registry of the logger manager singleton. A capacity of 0 implies no limit will be imposed; otherwise, new categories may be added only if `numCategories() < maxNumCategories()`. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down. Note that `0 < maxNumCategories() < numCategories()` _is_ a valid state, implying no new categories may be added. | xref:BloombergLP/ball/Administration/numCategories.adoc[`numCategories`] | Return the number of categories in the registry of the logger manager singleton. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down. | xref:BloombergLP/ball/Administration/passLevel.adoc[`passLevel`] | Return the pass threshold level currently set for the category having the specified `categoryName`, and a negative value if no such category exists. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down. | xref:BloombergLP/ball/Administration/recordLevel.adoc[`recordLevel`] | Return the record threshold level currently set for the category having the specified `categoryName`, and a negative value if no such category exists. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down. | xref:BloombergLP/ball/Administration/resetDefaultThresholdLevels.adoc[`resetDefaultThresholdLevels`] | Reset the default threshold levels to the original "factory‐supplied" values. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down. | xref:BloombergLP/ball/Administration/setAllThresholdLevels.adoc[`setAllThresholdLevels`] | Set _both_ the default threshold levels and threshold levels of all currently existing categories to the specified `recordLevel`, `passLevel`, `triggerLevel`, and `triggerAllLevel` values, respectively, if each of the level values is in the range `[0 .. 255]`. Return 0 on success, and a negative value otherwise (with no effect on the default threshold levels). The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down. | xref:BloombergLP/ball/Administration/setDefaultThresholdLevels.adoc[`setDefaultThresholdLevels`] | Set the default threshold levels to the specified `recordLevel`, `passLevel`, `triggerLevel`, and `triggerAllLevel` values, respectively, if each of the level values is in the range `[0 .. 255]`. Return 0 on success, and a negative value otherwise (with no effect on the default threshold levels). The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down. | xref:BloombergLP/ball/Administration/setMaxNumCategories.adoc[`setMaxNumCategories`] | Set the capacity of the registry of the logger manager singleton to the specified `length`. If `length` is 0, no limit will be imposed. No categories are removed from the registry if the current number of categories exceeds `length`; however, subsequent attempts to add categories to the registry will fail. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down, and `0 <= length`. | xref:BloombergLP/ball/Administration/setThresholdLevels.adoc[`setThresholdLevels`] | Set the threshold levels of each category currently in the registry of the logger manager singleton whose name matches the specified `pattern` to the specified `recordLevel`, `passLevel`, `triggerLevel`, and `triggerAllLevel` values, respectively, if each of the threshold values is in the range `[0 .. 255]`. Return the number of categories whose threshold levels were set, and a negative value if any of the threshold values were invalid. `pattern` is assumed to be of the form "X" or "X*" where X is a sequence of 0 or more characters and `*` matches any string (including the empty string). The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down. Note that only a `*` located at the end of `pattern` is recognized as a special character. Also note that this function has no effect on the threshold levels of categories added to the registry after it is called. | xref:BloombergLP/ball/Administration/triggerAllLevel.adoc[`triggerAllLevel`] | Return the trigger‐all threshold level currently set for the category having the specified `categoryName`, and a negative value if no such category exists. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down. | xref:BloombergLP/ball/Administration/triggerLevel.adoc[`triggerLevel`] | Return the trigger threshold level currently set for the category having the specified `categoryName`, and a negative value if no such category exists. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#