Merge branch 'topic/bernhard/reader-info' into topic/bernhard/sqlite

Now uses optional dbname configuration option

Conflicts:
	scripts/base/frameworks/logging/__load__.bro
	src/logging.bif
This commit is contained in:
Bernhard Amann 2012-07-02 10:13:54 -07:00
commit b8ad4567fb
167 changed files with 5537 additions and 1769 deletions

View file

@ -3,3 +3,4 @@
@load ./writers/ascii
@load ./writers/dataseries
@load ./writers/sqlite
@load ./writers/none

View file

@ -138,6 +138,10 @@ export {
## Callback function to trigger for rotated files. If not set, the
## default comes out of :bro:id:`Log::default_rotation_postprocessors`.
postprocessor: function(info: RotationInfo) : bool &optional;
## A key/value table that will be passed on the writer.
## Interpretation of the values is left to the writer.
config: table[string] of string &default=table();
};
## Sentinel value for indicating that a filter was not found when looked up.
@ -327,6 +331,8 @@ function __default_rotation_postprocessor(info: RotationInfo) : bool
{
if ( info$writer in default_rotation_postprocessors )
return default_rotation_postprocessors[info$writer](info);
return F;
}
function default_path_func(id: ID, path: string, rec: any) : string

View file

@ -0,0 +1,17 @@
##! Interface for the None log writer. Thiis writer is mainly for debugging.
module LogNone;
export {
## If true, output some debugging output that can be useful for unit
##testing the logging framework.
const debug = F &redef;
}
function default_rotation_postprocessor_func(info: Log::RotationInfo) : bool
{
return T;
}
redef Log::default_rotation_postprocessors += { [Log::WRITER_NONE] = default_rotation_postprocessor_func };