Changing logging's default naming scheme.

We now take the enum ID name rather than the module. Closes #483.
This commit is contained in:
Robin Sommer 2011-06-26 16:45:44 -07:00
parent ed8301a4df
commit 3ddba11e87

View file

@ -744,13 +744,14 @@ bool LogMgr::AddFilter(EnumVal* id, RecordVal* fval)
else else
{ {
// If no path is given, use the Stream ID's namespace as the default // If no path is given, use the Stream ID as the default but
// if it has one, and it ID itself otherwise. // strip the namespace.
const char* s = stream->name.c_str(); const char* s = stream->name.c_str();
const char* e = strstr(s, "::"); const char* e = s + strlen(s);
if ( ! e ) const char* t = strstr(s, "::");
e = s + strlen(s); if ( t )
s = t + 2;
string path(s, e); string path(s, e);
std::transform(path.begin(), path.end(), path.begin(), ::tolower); std::transform(path.begin(), path.end(), path.begin(), ::tolower);