mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
Remove deprecated attribute &disable_print_hook
This commit is contained in:
parent
72f16f2642
commit
254715eaaa
10 changed files with 7 additions and 23 deletions
|
@ -29,7 +29,7 @@ class BroLexer(RegexLexer):
|
||||||
r'|vector)\b', Keyword.Type),
|
r'|vector)\b', Keyword.Type),
|
||||||
(r'(T|F)\b', Keyword.Constant),
|
(r'(T|F)\b', Keyword.Constant),
|
||||||
(r'(&)((?:add|delete|expire)_func|attr|(create|read|write)_expire'
|
(r'(&)((?:add|delete|expire)_func|attr|(create|read|write)_expire'
|
||||||
r'|default|disable_print_hook|raw_output|encrypt|group|log'
|
r'|default|raw_output|encrypt|group|log'
|
||||||
r'|mergeable|optional|persistent|priority|redef'
|
r'|mergeable|optional|persistent|priority|redef'
|
||||||
r'|rotate_(?:interval|size)|synchronized)\b', bygroups(Punctuation,
|
r'|rotate_(?:interval|size)|synchronized)\b', bygroups(Punctuation,
|
||||||
Keyword)),
|
Keyword)),
|
||||||
|
|
Binary file not shown.
|
@ -600,10 +600,6 @@ scripting language supports the following built-in attributes.
|
||||||
|
|
||||||
.. TODO: needs to be documented.
|
.. TODO: needs to be documented.
|
||||||
|
|
||||||
.. bro:attr:: &disable_print_hook
|
|
||||||
|
|
||||||
Deprecated. Will be removed.
|
|
||||||
|
|
||||||
.. bro:attr:: &raw_output
|
.. bro:attr:: &raw_output
|
||||||
|
|
||||||
Opens a file in raw mode, i.e., non-ASCII characters are not
|
Opens a file in raw mode, i.e., non-ASCII characters are not
|
||||||
|
|
|
@ -15,7 +15,7 @@ const char* attr_name(attr_tag t)
|
||||||
"&add_func", "&delete_func", "&expire_func",
|
"&add_func", "&delete_func", "&expire_func",
|
||||||
"&read_expire", "&write_expire", "&create_expire",
|
"&read_expire", "&write_expire", "&create_expire",
|
||||||
"&persistent", "&synchronized", "&postprocessor",
|
"&persistent", "&synchronized", "&postprocessor",
|
||||||
"&encrypt", "&match", "&disable_print_hook",
|
"&encrypt", "&match",
|
||||||
"&raw_output", "&mergeable", "&priority",
|
"&raw_output", "&mergeable", "&priority",
|
||||||
"&group", "&log", "&error_handler", "&type_column",
|
"&group", "&log", "&error_handler", "&type_column",
|
||||||
"(&tracked)",
|
"(&tracked)",
|
||||||
|
@ -385,11 +385,6 @@ void Attributes::CheckAttr(Attr* a)
|
||||||
// FIXME: Check here for global ID?
|
// FIXME: Check here for global ID?
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ATTR_DISABLE_PRINT_HOOK:
|
|
||||||
if ( type->Tag() != TYPE_FILE )
|
|
||||||
Error("&disable_print_hook only applicable to files");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ATTR_RAW_OUTPUT:
|
case ATTR_RAW_OUTPUT:
|
||||||
if ( type->Tag() != TYPE_FILE )
|
if ( type->Tag() != TYPE_FILE )
|
||||||
Error("&raw_output only applicable to files");
|
Error("&raw_output only applicable to files");
|
||||||
|
|
|
@ -28,7 +28,6 @@ typedef enum {
|
||||||
ATTR_POSTPROCESSOR,
|
ATTR_POSTPROCESSOR,
|
||||||
ATTR_ENCRYPT,
|
ATTR_ENCRYPT,
|
||||||
ATTR_MATCH,
|
ATTR_MATCH,
|
||||||
ATTR_DISABLE_PRINT_HOOK,
|
|
||||||
ATTR_RAW_OUTPUT,
|
ATTR_RAW_OUTPUT,
|
||||||
ATTR_MERGEABLE,
|
ATTR_MERGEABLE,
|
||||||
ATTR_PRIORITY,
|
ATTR_PRIORITY,
|
||||||
|
|
|
@ -514,9 +514,6 @@ void BroFile::SetAttrs(Attributes* arg_attrs)
|
||||||
InitEncrypt(log_encryption_key->AsString()->CheckString());
|
InitEncrypt(log_encryption_key->AsString()->CheckString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( attrs->FindAttr(ATTR_DISABLE_PRINT_HOOK) )
|
|
||||||
DisablePrintHook();
|
|
||||||
|
|
||||||
if ( attrs->FindAttr(ATTR_RAW_OUTPUT) )
|
if ( attrs->FindAttr(ATTR_RAW_OUTPUT) )
|
||||||
EnableRawOutput();
|
EnableRawOutput();
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ public:
|
||||||
RecordVal* Rotate();
|
RecordVal* Rotate();
|
||||||
|
|
||||||
// Set &rotate_interval, &rotate_size, &postprocessor,
|
// Set &rotate_interval, &rotate_size, &postprocessor,
|
||||||
// &disable_print_hook, and &raw_output attributes.
|
// and &raw_output attributes.
|
||||||
void SetAttrs(Attributes* attrs);
|
void SetAttrs(Attributes* attrs);
|
||||||
|
|
||||||
// Returns the current size of the file, after fresh stat'ing.
|
// Returns the current size of the file, after fresh stat'ing.
|
||||||
|
|
|
@ -4858,7 +4858,7 @@ function file_size%(f: string%) : double
|
||||||
%}
|
%}
|
||||||
|
|
||||||
## Disables sending :bro:id:`print_hook` events to remote peers for a given
|
## Disables sending :bro:id:`print_hook` events to remote peers for a given
|
||||||
## file. This function is equivalent to :bro:attr:`&disable_print_hook`. In a
|
## file. In a
|
||||||
## distributed setup, communicating Bro instances generate the event
|
## distributed setup, communicating Bro instances generate the event
|
||||||
## :bro:id:`print_hook` for each print statement and send it to the remote
|
## :bro:id:`print_hook` for each print statement and send it to the remote
|
||||||
## side. When disabled for a particular file, these events will not be
|
## side. When disabled for a particular file, these events will not be
|
||||||
|
@ -4874,7 +4874,7 @@ function disable_print_hook%(f: file%): any
|
||||||
%}
|
%}
|
||||||
|
|
||||||
## Prevents escaping of non-ASCII characters when writing to a file.
|
## Prevents escaping of non-ASCII characters when writing to a file.
|
||||||
## This function is equivalent to :bro:attr:`&disable_print_hook`.
|
## This function is equivalent to :bro:attr:`&raw_output`.
|
||||||
##
|
##
|
||||||
## f: The file to disable raw output for.
|
## f: The file to disable raw output for.
|
||||||
##
|
##
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// See the file "COPYING" in the main distribution directory for copyright.
|
// See the file "COPYING" in the main distribution directory for copyright.
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%expect 90
|
%expect 87
|
||||||
|
|
||||||
%token TOK_ADD TOK_ADD_TO TOK_ADDR TOK_ANY
|
%token TOK_ADD TOK_ADD_TO TOK_ADDR TOK_ANY
|
||||||
%token TOK_ATENDIF TOK_ATELSE TOK_ATIF TOK_ATIFDEF TOK_ATIFNDEF
|
%token TOK_ATENDIF TOK_ATELSE TOK_ATIF TOK_ATIFDEF TOK_ATIFNDEF
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
%token TOK_ATTR_ROTATE_SIZE TOK_ATTR_DEL_FUNC TOK_ATTR_EXPIRE_FUNC
|
%token TOK_ATTR_ROTATE_SIZE TOK_ATTR_DEL_FUNC TOK_ATTR_EXPIRE_FUNC
|
||||||
%token TOK_ATTR_EXPIRE_CREATE TOK_ATTR_EXPIRE_READ TOK_ATTR_EXPIRE_WRITE
|
%token TOK_ATTR_EXPIRE_CREATE TOK_ATTR_EXPIRE_READ TOK_ATTR_EXPIRE_WRITE
|
||||||
%token TOK_ATTR_PERSISTENT TOK_ATTR_SYNCHRONIZED
|
%token TOK_ATTR_PERSISTENT TOK_ATTR_SYNCHRONIZED
|
||||||
%token TOK_ATTR_DISABLE_PRINT_HOOK TOK_ATTR_RAW_OUTPUT TOK_ATTR_MERGEABLE
|
%token TOK_ATTR_RAW_OUTPUT TOK_ATTR_MERGEABLE
|
||||||
%token TOK_ATTR_PRIORITY TOK_ATTR_GROUP TOK_ATTR_LOG TOK_ATTR_ERROR_HANDLER
|
%token TOK_ATTR_PRIORITY TOK_ATTR_GROUP TOK_ATTR_LOG TOK_ATTR_ERROR_HANDLER
|
||||||
%token TOK_ATTR_TYPE_COLUMN
|
%token TOK_ATTR_TYPE_COLUMN
|
||||||
|
|
||||||
|
@ -1290,8 +1290,6 @@ attr:
|
||||||
{ $$ = new Attr(ATTR_ENCRYPT); }
|
{ $$ = new Attr(ATTR_ENCRYPT); }
|
||||||
| TOK_ATTR_ENCRYPT '=' expr
|
| TOK_ATTR_ENCRYPT '=' expr
|
||||||
{ $$ = new Attr(ATTR_ENCRYPT, $3); }
|
{ $$ = new Attr(ATTR_ENCRYPT, $3); }
|
||||||
| TOK_ATTR_DISABLE_PRINT_HOOK
|
|
||||||
{ $$ = new Attr(ATTR_DISABLE_PRINT_HOOK); }
|
|
||||||
| TOK_ATTR_RAW_OUTPUT
|
| TOK_ATTR_RAW_OUTPUT
|
||||||
{ $$ = new Attr(ATTR_RAW_OUTPUT); }
|
{ $$ = new Attr(ATTR_RAW_OUTPUT); }
|
||||||
| TOK_ATTR_MERGEABLE
|
| TOK_ATTR_MERGEABLE
|
||||||
|
|
|
@ -319,7 +319,6 @@ when return TOK_WHEN;
|
||||||
&create_expire return TOK_ATTR_EXPIRE_CREATE;
|
&create_expire return TOK_ATTR_EXPIRE_CREATE;
|
||||||
&default return TOK_ATTR_DEFAULT;
|
&default return TOK_ATTR_DEFAULT;
|
||||||
&delete_func return TOK_ATTR_DEL_FUNC;
|
&delete_func return TOK_ATTR_DEL_FUNC;
|
||||||
&disable_print_hook return TOK_ATTR_DISABLE_PRINT_HOOK;
|
|
||||||
&raw_output return TOK_ATTR_RAW_OUTPUT;
|
&raw_output return TOK_ATTR_RAW_OUTPUT;
|
||||||
&encrypt return TOK_ATTR_ENCRYPT;
|
&encrypt return TOK_ATTR_ENCRYPT;
|
||||||
&error_handler return TOK_ATTR_ERROR_HANDLER;
|
&error_handler return TOK_ATTR_ERROR_HANDLER;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue