diff --git a/scripts/base/frameworks/logging/main.bro b/scripts/base/frameworks/logging/main.bro index d2013ba8dc..bf1affcb01 100644 --- a/scripts/base/frameworks/logging/main.bro +++ b/scripts/base/frameworks/logging/main.bro @@ -6,9 +6,9 @@ module Log; export { - ## Type that defines a ID unique for each log stream. Scripts creating new log + ## Type that defines an ID unique to each log stream. Scripts creating new log ## streams need to redef this enum to add their own specific log ID. The log ID - ## implicitly determines the default name of the generated log file. + ## implicitly determines the default name of the generated log file. type Log::ID: enum { ## Dummy place-holder. UNKNOWN @@ -33,13 +33,13 @@ export { const set_separator = "," &redef; ## String to use for empty fields. This should be different from - ## *unset_field* to make the output unambiguous. + ## *unset_field* to make the output unambiguous. ## Can be overwritten by individual writers. const empty_field = "(empty)" &redef; ## String to use for an unset &optional field. ## Can be overwritten by individual writers. - const unset_field = "-" &redef; + const unset_field = "-" &redef; ## Type defining the content of a logging stream. type Stream: record { diff --git a/scripts/base/frameworks/logging/writers/dataseries.bro b/scripts/base/frameworks/logging/writers/dataseries.bro index 6fd65debdb..b24601d6b9 100644 --- a/scripts/base/frameworks/logging/writers/dataseries.bro +++ b/scripts/base/frameworks/logging/writers/dataseries.bro @@ -57,4 +57,4 @@ function default_rotation_postprocessor_func(info: Log::RotationInfo) : bool return Log::run_rotation_postprocessor_cmd(info, dst); } -# redef Log::default_rotation_postprocessors += { [Log::WRITER_DATASERIES] = default_rotation_postprocessor_func }; +redef Log::default_rotation_postprocessors += { [Log::WRITER_DATASERIES] = default_rotation_postprocessor_func }; diff --git a/scripts/base/frameworks/logging/writers/none.bro b/scripts/base/frameworks/logging/writers/none.bro index 3a2e3c0e81..5763b796a9 100644 --- a/scripts/base/frameworks/logging/writers/none.bro +++ b/scripts/base/frameworks/logging/writers/none.bro @@ -13,5 +13,5 @@ function default_rotation_postprocessor_func(info: Log::RotationInfo) : bool return T; } -# redef Log::default_rotation_postprocessors += { [Log::WRITER_NONE] = default_rotation_postprocessor_func }; +redef Log::default_rotation_postprocessors += { [Log::WRITER_NONE] = default_rotation_postprocessor_func }; diff --git a/scripts/base/init-bare.bro b/scripts/base/init-bare.bro index 9b82f2a2d2..1199bdd7bc 100644 --- a/scripts/base/init-bare.bro +++ b/scripts/base/init-bare.bro @@ -3364,7 +3364,6 @@ const global_hash_seed: string = "" &redef; ## The maximum is currently 128 bits. const bits_per_uid: count = 96 &redef; - # Load these frameworks here because they use fairly deep integration with # BiFs and script-land defined types. @load base/frameworks/logging diff --git a/src/Type.cc b/src/Type.cc index 17a6efa203..f941041414 100644 --- a/src/Type.cc +++ b/src/Type.cc @@ -1476,9 +1476,9 @@ void EnumType::CheckAndAddName(const string& module_name, const char* name, } else { - // We allow double-definitions if matching exactly. This is - // so that we can define an enum both in a *.bif and *.bro to - // avoid cyclic dependencies. + // We allow double-definitions if matching exactly. This is so that + // we can define an enum both in a *.bif and *.bro for avoiding + // cyclic dependencies. if ( id->Name() != make_full_var_name(module_name.c_str(), name) || (id->HasVal() && val != id->ID_Val()->AsEnum()) ) { diff --git a/src/logging/Component.cc b/src/logging/Component.cc index 90bc9be819..3af29fd96f 100644 --- a/src/logging/Component.cc +++ b/src/logging/Component.cc @@ -2,7 +2,6 @@ #include "Component.h" #include "Manager.h" - #include "../Desc.h" #include "../util.h" @@ -25,5 +24,3 @@ void Component::DoDescribe(ODesc* d) const d->Add("Log::WRITER_"); d->Add(CanonicalName()); } - - diff --git a/src/plugin/ComponentManager.h b/src/plugin/ComponentManager.h index 9f15bcf59d..7337cf069a 100644 --- a/src/plugin/ComponentManager.h +++ b/src/plugin/ComponentManager.h @@ -135,8 +135,6 @@ ComponentManager::ComponentManager(const string& arg_module, const string& ::ID* id = install_ID(local_id.c_str(), module.c_str(), true, true); add_type(id, tag_enum_type, 0); broxygen_mgr->Identifier(id); - - // fprintf(stderr, "Enum: %s\n", id->Name()); } template @@ -246,7 +244,6 @@ void ComponentManager::RegisterComponent(C* component, string id = fmt("%s%s", prefix.c_str(), cname.c_str()); tag_enum_type->AddName(module, id.c_str(), component->Tag().AsEnumVal()->InternalInt(), true); - // fprintf(stderr, "Enum item: %s/%s\n", module.c_str(), id.c_str()); } } // namespace plugin