[#BloombergLP-ball-LoggerManager-setCategory-07f] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/LoggerManager.adoc[LoggerManager]::setCategory :relfileprefix: ../../../ :mrdocs: `setCategory` overloads == Synopses Declared in `<ball_loggermanager.h>` Add to the category registry of this logger manager a new category having the specified `categoryName` and default threshold levels if `categoryName` is not present in the registry and the number of categories in the registry is less than the registry capacity. Return the address of the (possibly newly‐created) non‐modifiable category having `categoryName`, if such a category exists, and the address of the non‐modifiable _Default_ _Category_ otherwise. The behavior is undefined unless `categoryName` is null‐terminated. Note that a valid category address is _always_ returned. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/ball/Category.adoc[Category] const* xref:BloombergLP/ball/LoggerManager/setCategory-07c.adoc[setCategory](char const* categoryName); ---- [.small]#xref:BloombergLP/ball/LoggerManager/setCategory-07c.adoc[_» more..._]# Add to the category registry of this logger manager a new category having the specified `categoryName` and default threshold levels if `categoryName` is not present in the registry and the number of categories in the registry is less than the registry capacity. Return the address of the (possibly newly‐created) non‐modifiable category having `categoryName`, if such a category exists, and the address of the non‐modifiable _Default_ _Category_ otherwise. If the specified `categoryHolder` is non‐null, then also load into `categoryHolder` the returned category and its maximum level and link `categoryHolder` to the category if it has not yet been linked. The behavior is undefined unless `categoryName` is null‐terminated. Note that a valid category address is _always_ returned. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/ball/Category.adoc[Category] const* xref:BloombergLP/ball/LoggerManager/setCategory-03.adoc[setCategory]( xref:BloombergLP/ball/CategoryHolder.adoc[CategoryHolder]* categoryHolder, char const* categoryName); ---- [.small]#xref:BloombergLP/ball/LoggerManager/setCategory-03.adoc[_» more..._]# Add to the category registry of this logger manager a new category having the specified `categoryName` and `recordLevel`, `passLevel`, `triggerLevel`, and `triggerAllLevel` threshold levels, respectively, if (1) `categoryName` is not present in the registry, (2) the number of categories in the registry is less than the registry capacity, and (3) `recordLevel`, `passLevel`, `triggerLevel`, and `triggerAllLevel` are all within the range `[0 .. 255]`. If `categoryName` is already present and each threshold level is within the valid range then reset the threshold levels of `categoryName` to the specified values. Return the address of the (possibly newly‐created) modifiable category having `categoryName` if `categoryName` was either created or its thresholds reset, and 0 otherwise. The behavior is undefined unless `categoryName` is null‐terminated. Note that 0, and _not_ the _Default_ _Category_, is returned on failure. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/ball/Category.adoc[Category]* xref:BloombergLP/ball/LoggerManager/setCategory-07e.adoc[setCategory]( char const* categoryName, int recordLevel, int passLevel, int triggerLevel, int triggerAllLevel); ---- [.small]#xref:BloombergLP/ball/LoggerManager/setCategory-07e.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#