[#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&hyphen;level components of the `ball` package&period; 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&period;

== Synopsis

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

[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 `&lsqb;0 &period;&period; 255&rsqb;`&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down&period;
| xref:BloombergLP/ball/Administration/defaultPassThresholdLevel.adoc[`defaultPassThresholdLevel`] 
| Return the default pass threshold level&period; The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down&period;
| xref:BloombergLP/ball/Administration/defaultRecordThresholdLevel.adoc[`defaultRecordThresholdLevel`] 
| Return the default record threshold level&period; The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down&period;
| xref:BloombergLP/ball/Administration/defaultTriggerAllThresholdLevel.adoc[`defaultTriggerAllThresholdLevel`] 
| Return the default trigger&hyphen;all threshold level&period; The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down&period;
| xref:BloombergLP/ball/Administration/defaultTriggerThresholdLevel.adoc[`defaultTriggerThresholdLevel`] 
| Return the default trigger threshold level&period; The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down&period;
| xref:BloombergLP/ball/Administration/maxNumCategories.adoc[`maxNumCategories`] 
| Return the current capacity of the registry of the logger manager singleton&period; A capacity of 0 implies no limit will be imposed&semi; otherwise, new categories may be added only if `numCategories() &lt; maxNumCategories()`&period; The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down&period; Note that `0 &lt; maxNumCategories() &lt; numCategories()` _is_ a valid state, implying no new categories may be added&period;
| xref:BloombergLP/ball/Administration/numCategories.adoc[`numCategories`] 
| Return the number of categories in the registry of the logger manager singleton&period; The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down&period;
| 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&period; The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down&period;
| 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&period; The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down&period;
| xref:BloombergLP/ball/Administration/resetDefaultThresholdLevels.adoc[`resetDefaultThresholdLevels`] 
| Reset the default threshold levels to the original &quot;factory&hyphen;supplied&quot; values&period; The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down&period;
| 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 `&lsqb;0 &period;&period; 255&rsqb;`&period; Return 0 on success, and a negative value otherwise (with no effect on the default threshold levels)&period; The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down&period;
| 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 `&lsqb;0 &period;&period; 255&rsqb;`&period; Return 0 on success, and a negative value otherwise (with no effect on the default threshold levels)&period; The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down&period;
| xref:BloombergLP/ball/Administration/setMaxNumCategories.adoc[`setMaxNumCategories`] 
| Set the capacity of the registry of the logger manager singleton to the specified `length`&period; If `length` is 0, no limit will be imposed&period; No categories are removed from the registry if the current number of categories exceeds `length`&semi; however, subsequent attempts to add categories to the registry will fail&period; The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down, and `0 &lt;&equals; length`&period;
| 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 `&lsqb;0 &period;&period; 255&rsqb;`&period; Return the number of categories whose threshold levels were set, and a negative value if any of the threshold values were invalid&period; `pattern` is assumed to be of the form &quot;X&quot; or &quot;X&ast;&quot; where X is a sequence of 0 or more characters and `&ast;` matches any string (including the empty string)&period; The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down&period; Note that only a `&ast;` located at the end of `pattern` is recognized as a special character&period; Also note that this function has no effect on the threshold levels of categories added to the registry after it is called&period;
| xref:BloombergLP/ball/Administration/triggerAllLevel.adoc[`triggerAllLevel`] 
| Return the trigger&hyphen;all threshold level currently set for the category having the specified `categoryName`, and a negative value if no such category exists&period; The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down&period;
| 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&period; The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down&period;
|===



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