This struct provides a suite of utility functions that facilitate the management of the categories in LoggerManager.

Synopsis

Declared in <ball_loggercategoryutil.h>

struct LoggerCategoryUtil;

Static Member Functions

Name

Description

addCategoryHierarchically

Add, to the specified loggerManager, 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.

setThresholdLevels

Same as setThresholdLevelsHierarchically except that a * located at the end of pattern is recognized as a special character and removed before performing the operation. Thus, this function sets, in the specified loggerManager, the threshold levels of every existing and future category whose name has, as a prefix, the substring of pattern excluding an optional trailing *, to the specified threshold values, recordLevel, passLevel, triggerLevel, and triggerAllLevel. In case pattern is * or empty, set the threshold level of every existing category, and remove all preliminary settings (for categories that do not exist yet). Return the number of categories whose threshold levels were set, and a negative value, with no effect, if any of the specified threshold values is outside the range [0 .. 255]. The behavior is undefined unless loggerManager is not in the process of being destroyed. See also setThresholdLevelsHierarchically and ball::CategoryManager::setThresholdLevelsHierarchically.

setThresholdLevelsHierarchically

In case the specified categoryNamePrefix is not empty set, in the specified loggerManager, the threshold levels of every existing and future category whose name has, as a prefix, categoryNamePrefix to the specified threshold values, recordLevel, passLevel, triggerLevel, and triggerAllLevel. In case categoryNamePrefix is empty set the threshold level of every existing category, and remove all preliminary settings (for categories that do not exist yet). Return the number of categories whose threshold levels were set, and a negative value, with no effect, if any of the specified threshold values is outside the range [0 .. 255]. The behavior is undefined unless loggerManager is not in the process of being destroyed. See also ball::CategoryManager::setThresholdLevelsHierarchically.

Created with MrDocs