Merge branch 'timoore/props'
This commit is contained in:
commit
ff96add35f
1 changed files with 12 additions and 6 deletions
|
@ -85,20 +85,26 @@ LogClassMapping log_class_mappings [] = {
|
||||||
/**
|
/**
|
||||||
* Get the logging classes.
|
* Get the logging classes.
|
||||||
*/
|
*/
|
||||||
|
// XXX Making the result buffer be global is a band-aid that hopefully
|
||||||
|
// delays its destruction 'til after its last use.
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
string loggingResult;
|
||||||
|
}
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
getLoggingClasses ()
|
getLoggingClasses ()
|
||||||
{
|
{
|
||||||
sgDebugClass classes = logbuf::get_log_classes();
|
sgDebugClass classes = logbuf::get_log_classes();
|
||||||
static string result;
|
loggingResult.clear();
|
||||||
result = "";
|
|
||||||
for (int i = 0; log_class_mappings[i].c != SG_UNDEFD; i++) {
|
for (int i = 0; log_class_mappings[i].c != SG_UNDEFD; i++) {
|
||||||
if ((classes&log_class_mappings[i].c) > 0) {
|
if ((classes&log_class_mappings[i].c) > 0) {
|
||||||
if (!result.empty())
|
if (!loggingResult.empty())
|
||||||
result += '|';
|
loggingResult += '|';
|
||||||
result += log_class_mappings[i].name;
|
loggingResult += log_class_mappings[i].name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result.c_str();
|
return loggingResult.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue