Quick Links:

bal | bbl | bdl | bsl

Static Public Member Functions

ball::Administration Struct Reference

#include <ball_administration.h>

List of all members.

Static Public Member Functions

static int addCategory (const char *categoryName, int recordLevel, int passLevel, int triggerLevel, int triggerAllLevel)
static int setAllThresholdLevels (int recordLevel, int passLevel, int triggerLevel, int triggerAllLevel)
static int setDefaultThresholdLevels (int recordLevel, int passLevel, int triggerLevel, int triggerAllLevel)
static int setThresholdLevels (const char *pattern, int recordLevel, int passLevel, int triggerLevel, int triggerAllLevel)
static void resetDefaultThresholdLevels ()
static int recordLevel (const char *categoryName)
static int passLevel (const char *categoryName)
static int triggerLevel (const char *categoryName)
static int triggerAllLevel (const char *categoryName)
static int defaultRecordThresholdLevel ()
static int defaultPassThresholdLevel ()
static int defaultTriggerThresholdLevel ()
static int defaultTriggerAllThresholdLevel ()
static int maxNumCategories ()
static int numCategories ()
static void setMaxNumCategories (int length)

Detailed Description

This struct provides a namespace for a suite of utility functions that simplifies administration of the ball logging subsystem, and insulates administrative clients from changes to lower-level components of the ball package. A precondition common to all of the utility functions is that the logger manager singleton must be initialized and not in the process of being shut down.

See Component ball_administration


Member Function Documentation

static int ball::Administration::addCategory ( const char *  categoryName,
int  recordLevel,
int  passLevel,
int  triggerLevel,
int  triggerAllLevel 
) [static]

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.

static int ball::Administration::setAllThresholdLevels ( int  recordLevel,
int  passLevel,
int  triggerLevel,
int  triggerAllLevel 
) [static]

Set both the default threshold levels and threshold levels of all currently existing categories to the specified recordLevel, passLevel, triggerLevel, and triggerAllLevel values, respectively, if each of the level values is in the range [0 .. 255]. Return 0 on success, and a negative value otherwise (with no effect on the default threshold levels). The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down.

static int ball::Administration::setDefaultThresholdLevels ( int  recordLevel,
int  passLevel,
int  triggerLevel,
int  triggerAllLevel 
) [static]

Set the default threshold levels to the specified recordLevel, passLevel, triggerLevel, and triggerAllLevel values, respectively, if each of the level values is in the range [0 .. 255]. Return 0 on success, and a negative value otherwise (with no effect on the default threshold levels). The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down.

static int ball::Administration::setThresholdLevels ( 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 logger manager singleton 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 the logger manager singleton has been initialized and is not in the process of being shut down. 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.

static void ball::Administration::resetDefaultThresholdLevels (  )  [static]

Reset the default threshold levels to the original "factory-supplied" values. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down.

static int ball::Administration::recordLevel ( const char *  categoryName  )  [static]

Return the record threshold level currently set for the category having the specified categoryName, and a negative value if no such category exists. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down.

static int ball::Administration::passLevel ( const char *  categoryName  )  [static]

Return the pass threshold level currently set for the category having the specified categoryName, and a negative value if no such category exists. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down.

static int ball::Administration::triggerLevel ( const char *  categoryName  )  [static]

Return the trigger threshold level currently set for the category having the specified categoryName, and a negative value if no such category exists. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down.

static int ball::Administration::triggerAllLevel ( const char *  categoryName  )  [static]

Return the trigger-all threshold level currently set for the category having the specified categoryName, and a negative value if no such category exists. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down.

static int ball::Administration::defaultRecordThresholdLevel (  )  [static]

Return the default record threshold level. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down.

static int ball::Administration::defaultPassThresholdLevel (  )  [static]

Return the default pass threshold level. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down.

static int ball::Administration::defaultTriggerThresholdLevel (  )  [static]

Return the default trigger threshold level. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down.

static int ball::Administration::defaultTriggerAllThresholdLevel (  )  [static]

Return the default trigger-all threshold level. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down.

static int ball::Administration::maxNumCategories (  )  [static]

Return the current capacity of the registry of the logger manager singleton. A capacity of 0 implies no limit will be imposed; otherwise, new categories may be added only if numCategories() < maxNumCategories(). The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down. Note that 0 < maxNumCategories() < numCategories() is a valid state, implying no new categories may be added.

static int ball::Administration::numCategories (  )  [static]

Return the number of categories in the registry of the logger manager singleton. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down.

static void ball::Administration::setMaxNumCategories ( int  length  )  [static]

Set the capacity of the registry of the logger manager singleton to the specified length. If length is 0, no limit will be imposed. No categories are removed from the registry if the current number of categories exceeds length; however, subsequent attempts to add categories to the registry will fail. The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down, and 0 <= length.


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