mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Loaded scripts is indented with spaces now and makes more sense to look at.
- Updated a test to make it pass again.
This commit is contained in:
parent
7ae4a37279
commit
36dbaa5b92
3 changed files with 33 additions and 20 deletions
|
@ -4,17 +4,30 @@ export {
|
|||
redef enum Log::ID += { LOG };
|
||||
|
||||
type Info: record {
|
||||
depth: count &log;
|
||||
name: string &log;
|
||||
};
|
||||
}
|
||||
|
||||
event bro_init()
|
||||
const depth: table[count] of string = {
|
||||
[0] = "",
|
||||
[1] = " ",
|
||||
[2] = " ",
|
||||
[3] = " ",
|
||||
[4] = " ",
|
||||
[5] = " ",
|
||||
[6] = " ",
|
||||
[7] = " ",
|
||||
[8] = " ",
|
||||
[9] = " ",
|
||||
[10] = " ",
|
||||
};
|
||||
|
||||
event bro_init() &priority=5
|
||||
{
|
||||
Log::create_stream(LoadedScripts::LOG, [$columns=Info]);
|
||||
}
|
||||
|
||||
event bro_script_loaded(path: string, level: count)
|
||||
{
|
||||
Log::write(LoadedScripts::LOG, [$depth=level, $name=path]);
|
||||
Log::write(LoadedScripts::LOG, [$name=cat(depth[level], path)]);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue