[#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 `&lt;ball&lowbar;log&period;h&gt;`

Return from the logger manager singleton&apos;s category registry the address of the non&hyphen;modifiable category having the specified `categoryName`, or, if no such category exists, add a new category having `categoryName` to the registry if possible (i&period;e&period;, if the registry has sufficient capacity to accommodate new entries)&semi; otherwise, return the address of the non&hyphen;modifiable _Default_ _Category_&period; If the logger manager singleton is not initialized, return 0 with no effect&period; 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&hyphen;empty prefix of `categoryName` if such a category exists, and the threshold levels will be set as if `setCategory` had been called otherwise&period;


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

Return from the logger manager singleton&apos;s category registry the address of the non&hyphen;modifiable category having the specified `categoryName`, or, if no such category exists, add a new category having `categoryName` to the registry if possible (i&period;e&period;, if the registry has sufficient capacity to accommodate new entries)&semi; otherwise, return the address of the non&hyphen;modifiable _Default_ _Category_&period; If the logger manager singleton is not initialized, return 0 with no effect&period; 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&hyphen;empty prefix of `categoryName` if such a category exists, and the threshold levels will be set as if `setCategory` had been called otherwise&period; If the specified `categoryHolder` is non&hyphen;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&period; Note that this method has the same effect on the logger manager singleton&apos;s category registry as the one&hyphen;argument `setCategoryHierarchically` regardless of whether `0 &equals;&equals; categoryHolder`&period;


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


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