mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
Small (potential performance) improvement for logging framework.
This commit is contained in:
parent
2a9993619f
commit
76520645bb
1 changed files with 5 additions and 5 deletions
|
@ -348,16 +348,16 @@ function __default_rotation_postprocessor(info: RotationInfo) : bool
|
||||||
|
|
||||||
function default_path_func(id: ID, path: string, rec: any) : string
|
function default_path_func(id: ID, path: string, rec: any) : string
|
||||||
{
|
{
|
||||||
|
# The suggested path value is a previous result of this function
|
||||||
|
# or a filter path explicitly set by the user, so continue using it.
|
||||||
|
if ( path != "" )
|
||||||
|
return path;
|
||||||
|
|
||||||
local id_str = fmt("%s", id);
|
local id_str = fmt("%s", id);
|
||||||
|
|
||||||
local parts = split1(id_str, /::/);
|
local parts = split1(id_str, /::/);
|
||||||
if ( |parts| == 2 )
|
if ( |parts| == 2 )
|
||||||
{
|
{
|
||||||
# The suggested path value is a previous result of this function
|
|
||||||
# or a filter path explicitly set by the user, so continue using it.
|
|
||||||
if ( path != "" )
|
|
||||||
return path;
|
|
||||||
|
|
||||||
# Example: Notice::LOG -> "notice"
|
# Example: Notice::LOG -> "notice"
|
||||||
if ( parts[2] == "LOG" )
|
if ( parts[2] == "LOG" )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue