BDE 4.39.x Production Release
Loading...
Searching...
No Matches
ball::LoggerCategoryUtil Struct Reference

#include <ball_loggercategoryutil.h>

Detailed Description

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

See ball_loggercategoryutil

Static Public Member Functions

static CategoryaddCategoryHierarchically (LoggerManager *loggerManager, const char *categoryName)
 
static int setThresholdLevelsHierarchically (LoggerManager *loggerManager, const char *categoryNamePrefix, int recordLevel, int passLevel, int triggerLevel, int triggerAllLevel)
 
static int setThresholdLevels (LoggerManager *loggerManager, const char *pattern, int recordLevel, int passLevel, int triggerLevel, int triggerAllLevel)
 

Member Function Documentation

◆ addCategoryHierarchically()

Category * ball::LoggerCategoryUtil::addCategoryHierarchically ( LoggerManager loggerManager,
const char *  categoryName 
)
inlinestatic

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()

static int ball::LoggerCategoryUtil::setThresholdLevels ( LoggerManager loggerManager,
const char *  pattern,
int  recordLevel,
int  passLevel,
int  triggerLevel,
int  triggerAllLevel 
)
static

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].

Precondition
The behavior is undefined unless loggerManager is not in the process of being destroyed. See also setThresholdLevelsHierarchically and ball::CategoryManager::setThresholdLevelsHierarchically.
Deprecated:
Use setThresholdLevelsHierarchically instead.

◆ setThresholdLevelsHierarchically()

int ball::LoggerCategoryUtil::setThresholdLevelsHierarchically ( LoggerManager loggerManager,
const char *  categoryNamePrefix,
int  recordLevel,
int  passLevel,
int  triggerLevel,
int  triggerAllLevel 
)
inlinestatic

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].

Precondition
The behavior is undefined unless loggerManager is not in the process of being destroyed. See also ball::CategoryManager::setThresholdLevelsHierarchically.

The documentation for this struct was generated from the following file: