BDE 4.14.0 Production release
Loading...
Searching...
No Matches
ball::LoggerCategoryUtil Struct Reference

#include <ball_loggercategoryutil.h>

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)
 

Detailed Description

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

Member Function Documentation

◆ addCategoryHierarchically()

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

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 in loggerManager has reached the maximum capacity. The newly created category will have the same threshold levels as the category in loggerManager whose name is the longest non-empty prefix of categoryName if such a category exists, and the default threshold levels of loggermanager (which might be overridden by a default threshold levels callback) otherwise.

◆ setThresholdLevels()

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

Set the threshold levels of each category currently in the registry of the specified loggerManager whose name matches the specified pattern to the specified recordLevel, passLevel, triggerLevel, and triggerAllLevel values, respectively, if each of the threshold values is in the range [0 .. 255]. Return the number of categories whose threshold levels were set, and a negative value if any of the threshold values were invalid. pattern is assumed to be of the form "X" or "X*" where X is a sequence of 0 or more characters and * matches any string (including the empty string). The behavior is undefined unless loggerManager is not in the process of being destroyed. Note that only a * located at the end of pattern is recognized as a special character. Also note that this function has no effect on the threshold levels of categories added to the registry after it is called.

Deprecated:
Use setThresholdLevelsHierarchically instead.

◆ setThresholdLevelsHierarchically()

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

Set, in the specified loggerManager, the threshold levels of every category whose name has, as a prefix, the specified categoryNamePrefix to the specified threshold values, recordLevel, passLevel, triggerLevel, and triggerAllLevel. 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 null and categoryNamePrefix is null-terminated.


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