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:
Seth Hall 2011-09-29 15:53:54 -04:00
parent 7ae4a37279
commit 36dbaa5b92
3 changed files with 33 additions and 20 deletions

View file

@ -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)]);
}