mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Remove deprecated open_log_file and log_file_name functions
This commit is contained in:
parent
b635cc240b
commit
bfd037989b
6 changed files with 16 additions and 25 deletions
2
NEWS
2
NEWS
|
@ -379,6 +379,8 @@ Removed Functionality
|
|||
- ``send_state``
|
||||
- ``checkpoint_state``
|
||||
- ``rescan_state``
|
||||
- ``log_file_name``
|
||||
- ``open_log_file``
|
||||
|
||||
- The following events were deprecated in version 2.6 or below and are completely
|
||||
removed from this release:
|
||||
|
|
|
@ -1775,30 +1775,9 @@ type gtp_delete_pdp_ctx_response_elements: record {
|
|||
@load base/bif/strings.bif
|
||||
@load base/bif/option.bif
|
||||
|
||||
## Deprecated. This is superseded by the new logging framework.
|
||||
global log_file_name: function(tag: string): string &redef;
|
||||
|
||||
## Deprecated. This is superseded by the new logging framework.
|
||||
global open_log_file: function(tag: string): file &redef;
|
||||
|
||||
global done_with_network = F;
|
||||
event net_done(t: time) { done_with_network = T; }
|
||||
|
||||
function log_file_name(tag: string): string
|
||||
{
|
||||
local suffix = getenv("ZEEK_LOG_SUFFIX");
|
||||
|
||||
if ( suffix == "" )
|
||||
suffix = "log";
|
||||
|
||||
return fmt("%s.%s", tag, suffix);
|
||||
}
|
||||
|
||||
function open_log_file(tag: string): file
|
||||
{
|
||||
return open(log_file_name(tag));
|
||||
}
|
||||
|
||||
## Internal function.
|
||||
function add_interface(iold: string, inew: string): string
|
||||
{
|
||||
|
|
|
@ -2,8 +2,18 @@
|
|||
|
||||
module Profiling;
|
||||
|
||||
function log_suffix(): string
|
||||
{
|
||||
local rval = getenv("ZEEK_LOG_SUFFIX");
|
||||
|
||||
if ( rval == "" )
|
||||
return "log";
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
## Set the profiling output file.
|
||||
redef profiling_file = open_log_file("prof");
|
||||
redef profiling_file = open(fmt("prof.%s", Profiling::log_suffix()));
|
||||
|
||||
## Set the cheap profiling interval.
|
||||
redef profiling_interval = 15 secs;
|
||||
|
|
|
@ -32,7 +32,7 @@ event connection_established(c: connection)
|
|||
first = 0;
|
||||
}
|
||||
|
||||
global f = open_log_file("logger-test");
|
||||
global f = open("logger-test.log");
|
||||
|
||||
event reporter_info(t: time, msg: string, location: string)
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ global a6: addr = [::1];
|
|||
global b: bool = T;
|
||||
global c: count = 10;
|
||||
global d: double = -1.23;
|
||||
global f: file = open_log_file("sizeof_demo");
|
||||
global f: file = open("sizeof_demo.log");
|
||||
global i: int = -10;
|
||||
global iv: interval = -5sec;
|
||||
global p: port = 80/tcp;
|
||||
|
|
|
@ -13,7 +13,7 @@ export {
|
|||
} &log;
|
||||
}
|
||||
|
||||
const foo_log = open_log_file("Foo") &redef;
|
||||
const foo_log = open("Foo.log") &redef;
|
||||
|
||||
event zeek_init()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue