mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Un-deprecate file rotation functions
- rotate_file - rotate_file_by_name - calc_next_rotate These still have use-cases even though no longer used for our logging functionality. E.g. rotate_file_by_name may be used to rotate pcap dump files. Also the log_rotate_base_time option was marked deprecated, but still used in the new logging framework.
This commit is contained in:
parent
dafc44e8b9
commit
ea43c154cf
4 changed files with 4 additions and 15 deletions
5
NEWS
5
NEWS
|
@ -491,11 +491,6 @@ Deprecated Functionality
|
||||||
- The ``bro_is_terminating`` and ``bro_version`` function are deprecated and
|
- The ``bro_is_terminating`` and ``bro_version`` function are deprecated and
|
||||||
replaced by functions named ``zeek_is_terminating`` and ``zeek_version``.
|
replaced by functions named ``zeek_is_terminating`` and ``zeek_version``.
|
||||||
|
|
||||||
- The ``rotate_file``, ``rotate_file_by_name`` and ``calc_next_rotate`` functions
|
|
||||||
were marked as deprecated. These functions were used with the old pre-2.0 logging
|
|
||||||
framework and are no longer used. They also were marked as deprecated in their
|
|
||||||
documentation, however the functions themselves did not carry the deprecation marker.
|
|
||||||
|
|
||||||
Bro 2.6
|
Bro 2.6
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
|
|
@ -775,8 +775,6 @@ type IPAddrAnonymizationClass: enum {
|
||||||
OTHER_ADDR,
|
OTHER_ADDR,
|
||||||
};
|
};
|
||||||
|
|
||||||
## Deprecated.
|
|
||||||
##
|
|
||||||
## .. zeek:see:: rotate_file rotate_file_by_name
|
## .. zeek:see:: rotate_file rotate_file_by_name
|
||||||
type rotate_info: record {
|
type rotate_info: record {
|
||||||
old_name: string; ##< Original filename.
|
old_name: string; ##< Original filename.
|
||||||
|
@ -4622,7 +4620,7 @@ module GLOBAL;
|
||||||
## BPF filter the user has set via the -f command line options. Empty if none.
|
## BPF filter the user has set via the -f command line options. Empty if none.
|
||||||
const cmd_line_bpf_filter = "" &redef;
|
const cmd_line_bpf_filter = "" &redef;
|
||||||
|
|
||||||
## Deprecated.
|
## Base time of log rotations in 24-hour time format (``%H:%M``), e.g. "12:00".
|
||||||
const log_rotate_base_time = "0:00" &redef;
|
const log_rotate_base_time = "0:00" &redef;
|
||||||
|
|
||||||
## Write profiling info into this file in regular intervals. The easiest way to
|
## Write profiling info into this file in regular intervals. The easiest way to
|
||||||
|
|
|
@ -4621,7 +4621,7 @@ function get_file_name%(f: file%): string
|
||||||
## after the rotation, and the time when *f* was opened/closed.
|
## after the rotation, and the time when *f* was opened/closed.
|
||||||
##
|
##
|
||||||
## .. zeek:see:: rotate_file_by_name calc_next_rotate
|
## .. zeek:see:: rotate_file_by_name calc_next_rotate
|
||||||
function rotate_file%(f: file%): rotate_info &deprecated
|
function rotate_file%(f: file%): rotate_info
|
||||||
%{
|
%{
|
||||||
RecordVal* info = f->Rotate();
|
RecordVal* info = f->Rotate();
|
||||||
if ( info )
|
if ( info )
|
||||||
|
@ -4645,7 +4645,7 @@ function rotate_file%(f: file%): rotate_info &deprecated
|
||||||
## after the rotation, and the time when *f* was opened/closed.
|
## after the rotation, and the time when *f* was opened/closed.
|
||||||
##
|
##
|
||||||
## .. zeek:see:: rotate_file calc_next_rotate
|
## .. zeek:see:: rotate_file calc_next_rotate
|
||||||
function rotate_file_by_name%(f: string%): rotate_info &deprecated
|
function rotate_file_by_name%(f: string%): rotate_info
|
||||||
%{
|
%{
|
||||||
RecordVal* info = new RecordVal(rotate_info);
|
RecordVal* info = new RecordVal(rotate_info);
|
||||||
|
|
||||||
|
@ -4699,7 +4699,7 @@ function rotate_file_by_name%(f: string%): rotate_info &deprecated
|
||||||
## Returns: The duration until the next file rotation time.
|
## Returns: The duration until the next file rotation time.
|
||||||
##
|
##
|
||||||
## .. zeek:see:: rotate_file rotate_file_by_name
|
## .. zeek:see:: rotate_file rotate_file_by_name
|
||||||
function calc_next_rotate%(i: interval%) : interval &deprecated
|
function calc_next_rotate%(i: interval%) : interval
|
||||||
%{
|
%{
|
||||||
const char* base_time = log_rotate_base_time ?
|
const char* base_time = log_rotate_base_time ?
|
||||||
log_rotate_base_time->AsString()->CheckString() : 0;
|
log_rotate_base_time->AsString()->CheckString() : 0;
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
warning in /Users/johanna/bro/master/scripts/policy/misc/trim-trace-file.zeek, line 25: deprecated (rotate_file_by_name)
|
|
||||||
warning in /Users/johanna/bro/master/scripts/policy/misc/trim-trace-file.zeek, line 25: deprecated (rotate_file_by_name)
|
|
||||||
warning in /Users/johanna/bro/master/scripts/policy/misc/trim-trace-file.zeek, line 25: deprecated (rotate_file_by_name)
|
|
||||||
warning in /Users/johanna/bro/master/testing/btest/../../scripts//policy/misc/trim-trace-file.zeek, line 25: deprecated (rotate_file_by_name)
|
|
Loading…
Add table
Add a link
Reference in a new issue