diff --git a/NEWS b/NEWS index 3f987ee7aa..32eeaa7fe3 100644 --- a/NEWS +++ b/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: diff --git a/scripts/base/init-bare.zeek b/scripts/base/init-bare.zeek index a69f681f1f..24f6e24389 100644 --- a/scripts/base/init-bare.zeek +++ b/scripts/base/init-bare.zeek @@ -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 { diff --git a/scripts/policy/misc/profiling.zeek b/scripts/policy/misc/profiling.zeek index 197d3a3f82..4b6f05f169 100644 --- a/scripts/policy/misc/profiling.zeek +++ b/scripts/policy/misc/profiling.zeek @@ -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; diff --git a/testing/btest/core/reporter.zeek b/testing/btest/core/reporter.zeek index 8591096c2b..8ed75500ad 100644 --- a/testing/btest/core/reporter.zeek +++ b/testing/btest/core/reporter.zeek @@ -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) { diff --git a/testing/btest/language/sizeof.zeek b/testing/btest/language/sizeof.zeek index fc510afb70..48c69ddc27 100644 --- a/testing/btest/language/sizeof.zeek +++ b/testing/btest/language/sizeof.zeek @@ -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; diff --git a/testing/btest/scripts/base/frameworks/logging/file.zeek b/testing/btest/scripts/base/frameworks/logging/file.zeek index 6aa07f1699..b584f56fca 100644 --- a/testing/btest/scripts/base/frameworks/logging/file.zeek +++ b/testing/btest/scripts/base/frameworks/logging/file.zeek @@ -13,7 +13,7 @@ export { } &log; } -const foo_log = open_log_file("Foo") &redef; +const foo_log = open("Foo.log") &redef; event zeek_init() {