mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Changing logging's default naming scheme.
We now take the enum ID name rather than the module. Closes #483.
This commit is contained in:
parent
ed8301a4df
commit
3ddba11e87
1 changed files with 6 additions and 5 deletions
|
@ -744,13 +744,14 @@ bool LogMgr::AddFilter(EnumVal* id, RecordVal* fval)
|
|||
|
||||
else
|
||||
{
|
||||
// If no path is given, use the Stream ID's namespace as the default
|
||||
// if it has one, and it ID itself otherwise.
|
||||
// If no path is given, use the Stream ID as the default but
|
||||
// strip the namespace.
|
||||
const char* s = stream->name.c_str();
|
||||
const char* e = strstr(s, "::");
|
||||
const char* e = s + strlen(s);
|
||||
|
||||
if ( ! e )
|
||||
e = s + strlen(s);
|
||||
const char* t = strstr(s, "::");
|
||||
if ( t )
|
||||
s = t + 2;
|
||||
|
||||
string path(s, e);
|
||||
std::transform(path.begin(), path.end(), path.begin(), ::tolower);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue