mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 09:38:19 +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
|
@ -347,17 +347,17 @@ function __default_rotation_postprocessor(info: RotationInfo) : bool
|
|||
}
|
||||
|
||||
function default_path_func(id: ID, path: string, rec: any) : string
|
||||
{
|
||||
local id_str = fmt("%s", id);
|
||||
|
||||
local parts = split1(id_str, /::/);
|
||||
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;
|
||||
|
||||
local id_str = fmt("%s", id);
|
||||
|
||||
local parts = split1(id_str, /::/);
|
||||
if ( |parts| == 2 )
|
||||
{
|
||||
# Example: Notice::LOG -> "notice"
|
||||
if ( parts[2] == "LOG" )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue