mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Logging's path_func now receives the log record as argument.
Closes #555.
This commit is contained in:
parent
c436930acf
commit
cb31fd3bb9
5 changed files with 39 additions and 19 deletions
|
@ -902,9 +902,10 @@ bool LogMgr::Write(EnumVal* id, RecordVal* columns)
|
|||
|
||||
if ( filter->path_func )
|
||||
{
|
||||
val_list vl(2);
|
||||
val_list vl(3);
|
||||
vl.append(id->Ref());
|
||||
vl.append(filter->path_val->Ref());
|
||||
vl.append(columns->Ref());
|
||||
Val* v = filter->path_func->Call(&vl);
|
||||
|
||||
if ( ! v->Type()->Tag() == TYPE_STRING )
|
||||
|
@ -915,6 +916,7 @@ bool LogMgr::Write(EnumVal* id, RecordVal* columns)
|
|||
}
|
||||
|
||||
path = v->AsString()->CheckString();
|
||||
Unref(v);
|
||||
|
||||
#ifdef DEBUG
|
||||
DBG_LOG(DBG_LOGGING, "Path function for filter '%s' on stream '%s' return '%s'",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue