BloombergLP::ball::LoggerManager::addCategoryHierarchically

Add a new category, inheriting thresholds hierarchically.

Synopsis

Declared in <ball_loggermanager.h>

Category*
addCategoryHierarchically(char const* categoryName);

Description

Add a new category having the specified categoryName; return the address of the modifiable new category on success, and 0, with no effect, if a category by that name already exists or if the number of existing categories has reached the maximum capacity. The newly created category will have its threshold levels chosen primarily from two sources: threshold levels of an existing category or a category setting (to which no category exists) choosing the one whose name is the longest non-empty prefix of categoryName. If such a category or setting exists, and the default threshold levels (which might be overridden by a default threshold levels callback) otherwise. See also ball::CategoryManager::addCategoryHierarchically.

Return Value

address of the modifiable new category on success, and 0 otherwise

Parameters

NameDescription
categoryNamename of the category to add