mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
logging/Manager: zeek::detail'ify
Introducing zeek::logging::detail requires detail:: references to be qualified as preparation.
This commit is contained in:
parent
3afd6242c7
commit
dc552e647f
1 changed files with 5 additions and 5 deletions
|
@ -64,7 +64,7 @@ struct Manager::Filter {
|
||||||
struct Manager::WriterInfo {
|
struct Manager::WriterInfo {
|
||||||
EnumVal* type = nullptr;
|
EnumVal* type = nullptr;
|
||||||
double open_time = 0.0;
|
double open_time = 0.0;
|
||||||
detail::Timer* rotation_timer = nullptr;
|
zeek::detail::Timer* rotation_timer = nullptr;
|
||||||
double interval = 0.0;
|
double interval = 0.0;
|
||||||
Func* postprocessor = nullptr;
|
Func* postprocessor = nullptr;
|
||||||
WriterFrontend* writer = nullptr;
|
WriterFrontend* writer = nullptr;
|
||||||
|
@ -404,7 +404,7 @@ bool Manager::TraverseRecord(Stream* stream, Filter* filter, RecordType* rt, Tab
|
||||||
const auto& t = rtype->GetFieldType(i);
|
const auto& t = rtype->GetFieldType(i);
|
||||||
|
|
||||||
// Ignore if &log not specified.
|
// Ignore if &log not specified.
|
||||||
if ( ! rtype->FieldDecl(i)->GetAttr(detail::ATTR_LOG) )
|
if ( ! rtype->FieldDecl(i)->GetAttr(zeek::detail::ATTR_LOG) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
list<int> new_indices = indices;
|
list<int> new_indices = indices;
|
||||||
|
@ -494,7 +494,7 @@ bool Manager::TraverseRecord(Stream* stream, Filter* filter, RecordType* rt, Tab
|
||||||
else if ( t->Tag() == TYPE_VECTOR )
|
else if ( t->Tag() == TYPE_VECTOR )
|
||||||
st = t->AsVectorType()->Yield()->Tag();
|
st = t->AsVectorType()->Yield()->Tag();
|
||||||
|
|
||||||
bool optional = (bool)rtype->FieldDecl(i)->GetAttr(detail::ATTR_OPTIONAL);
|
bool optional = (bool)rtype->FieldDecl(i)->GetAttr(zeek::detail::ATTR_OPTIONAL);
|
||||||
|
|
||||||
filter->fields[filter->num_fields - 1] =
|
filter->fields[filter->num_fields - 1] =
|
||||||
new threading::Field(new_path.c_str(), nullptr, t->Tag(), st, optional);
|
new threading::Field(new_path.c_str(), nullptr, t->Tag(), st, optional);
|
||||||
|
@ -674,7 +674,7 @@ bool Manager::Write(EnumVal* id, RecordVal* columns_arg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! stream->total_writes ) {
|
if ( ! stream->total_writes ) {
|
||||||
std::string module_name = detail::extract_module_name(stream->name.c_str());
|
std::string module_name = zeek::detail::extract_module_name(stream->name.c_str());
|
||||||
std::initializer_list<telemetry::LabelView> labels{{"module", module_name}, {"stream", stream->name}};
|
std::initializer_list<telemetry::LabelView> labels{{"module", module_name}, {"stream", stream->name}};
|
||||||
stream->total_writes = total_log_stream_writes_family.GetOrAdd(labels);
|
stream->total_writes = total_log_stream_writes_family.GetOrAdd(labels);
|
||||||
}
|
}
|
||||||
|
@ -1099,7 +1099,7 @@ WriterFrontend* Manager::CreateWriter(EnumVal* id, EnumVal* writer, WriterBacken
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize metric for this frontend.
|
// Initialize metric for this frontend.
|
||||||
std::string stream_module_name = detail::extract_module_name(stream->name.c_str());
|
std::string stream_module_name = zeek::detail::extract_module_name(stream->name.c_str());
|
||||||
std::string writer_name = writer->GetType()->AsEnumType()->Lookup(writer->AsEnum());
|
std::string writer_name = writer->GetType()->AsEnumType()->Lookup(writer->AsEnum());
|
||||||
std::initializer_list<telemetry::LabelView> labels{{"writer", writer_name},
|
std::initializer_list<telemetry::LabelView> labels{{"writer", writer_name},
|
||||||
{"module", stream_module_name},
|
{"module", stream_module_name},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue