[#BloombergLP-ball-Log-setCategoryHierarchically-0b] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/Log.adoc[Log]::setCategoryHierarchically :relfileprefix: ../../../ :mrdocs: `setCategoryHierarchically` overloads == Synopses Declared in `<ball_log.h>` Return from the logger manager singleton's category registry the address of the non‐modifiable category having the specified `categoryName`, or, if no such category exists, add a new category having `categoryName` to the registry if possible (i.e., if the registry has sufficient capacity to accommodate new entries); otherwise, return the address of the non‐modifiable _Default_ _Category_. If the logger manager singleton is not initialized, return 0 with no effect. If a new category is created, it will have the same threshold levels as the category in the logger manager singleton whose name is the longest non‐empty prefix of `categoryName` if such a category exists, and the threshold levels will be set as if `setCategory` had been called otherwise. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static xref:BloombergLP/ball/Category.adoc[Category] const* xref:BloombergLP/ball/Log/setCategoryHierarchically-03.adoc[setCategoryHierarchically](char const* categoryName); ---- [.small]#xref:BloombergLP/ball/Log/setCategoryHierarchically-03.adoc[_» more..._]# Return from the logger manager singleton's category registry the address of the non‐modifiable category having the specified `categoryName`, or, if no such category exists, add a new category having `categoryName` to the registry if possible (i.e., if the registry has sufficient capacity to accommodate new entries); otherwise, return the address of the non‐modifiable _Default_ _Category_. If the logger manager singleton is not initialized, return 0 with no effect. If a new category is created, it will have the same threshold levels as the category in the logger manager singleton whose name is the longest non‐empty prefix of `categoryName` if such a category exists, and the threshold levels will be set as if `setCategory` had been called otherwise. If the specified `categoryHolder` is non‐zero, load it with the address of the returned category and the maximum threshold level of that category, and link `categoryHolder` to the other holders (if any) that currently reference the category. Note that this method has the same effect on the logger manager singleton's category registry as the one‐argument `setCategoryHierarchically` regardless of whether `0 == categoryHolder`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static xref:BloombergLP/ball/Category.adoc[Category] const* xref:BloombergLP/ball/Log/setCategoryHierarchically-00.adoc[setCategoryHierarchically]( xref:BloombergLP/ball/CategoryHolder.adoc[CategoryHolder]* categoryHolder, char const* categoryName); ---- [.small]#xref:BloombergLP/ball/Log/setCategoryHierarchically-00.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#