Create or update a category with the specified threshold levels.
Synopsis
Declared in <ball_loggermanager.h>
Category*
setCategory(
char const* categoryName,
int recordLevel,
int passLevel,
int triggerLevel,
int triggerAllLevel);
Description
Add to the category registry of this logger manager a new category having the specified categoryName and recordLevel, passLevel, triggerLevel, and triggerAllLevel threshold levels, respectively, if (1) categoryName is not present in the registry, (2) the number of categories in the registry is less than the registry capacity, and (3) recordLevel, passLevel, triggerLevel, and triggerAllLevel are all within the range [0 .. 255]. If categoryName is already present and each threshold level is within the valid range then reset the threshold levels of categoryName to the specified values. Return the address of the (possibly newly‐created) modifiable category having categoryName if categoryName was either created or its thresholds reset, and 0 otherwise. The behavior is undefined unless categoryName is null‐terminated. Note that 0, and not the Default Category, is returned on failure.
Return Value
address of the category if created or thresholds reset, and 0 otherwise
Parameters
Name |
Description |
categoryName |
name of the category to create or update |
recordLevel |
record threshold level |
passLevel |
pass threshold level |
triggerLevel |
trigger threshold level |
triggerAllLevel |
trigger‐all threshold level |
Created with MrDocs