[#BloombergLP-ball-Log-setCategoryHierarchically-03]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/Log.adoc[Log]::setCategoryHierarchically
:relfileprefix: ../../../
:mrdocs:

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;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/ball/Category.adoc[Category] const*
setCategoryHierarchically(char const* categoryName);
----


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