BloombergLP::ball::Administration::addCategory

Add a new category with the specified name and threshold levels.

Synopsis

Declared in <ball_administration.h>

static
int
addCategory(
    char const* categoryName,
    int recordLevel,
    int passLevel,
    int triggerLevel,
    int triggerAllLevel);

Description

Add to the registry of the logger manager singleton a new category having the specified categoryName and the specified recordLevel, passLevel, triggerLevel, and triggerAllLevel threshold levels, respectively, if (1) categoryName is not present in the category registry, (2) the number of categories in the registry is less than the registry capacity, and (3) each of the level values is in the range [0 .. 255]. Return 0 on success, and a non-zero value otherwise. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down.

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
categoryNamename of the category to add
recordLevelrecord threshold level for the new category
passLevelpass threshold level for the new category
triggerLeveltrigger threshold level for the new category
triggerAllLeveltrigger-all threshold level for the new category