mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 17:18:20 +00:00
Renaming the Logger to Reporter.
Also changing output to not include timestamps when we haven't started processing packets yet.
This commit is contained in:
parent
93894eed9b
commit
66e2c3b623
123 changed files with 722 additions and 713 deletions
|
@ -273,7 +273,7 @@ bool LogVal::Read(SerializationFormat* fmt)
|
|||
}
|
||||
|
||||
default:
|
||||
bro_logger->InternalError("unsupported type %s in LogVal::Write", type_name(type));
|
||||
reporter->InternalError("unsupported type %s in LogVal::Write", type_name(type));
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -374,7 +374,7 @@ bool LogVal::Write(SerializationFormat* fmt) const
|
|||
}
|
||||
|
||||
default:
|
||||
bro_logger->InternalError("unsupported type %s in LogVal::REad", type_name(type));
|
||||
reporter->InternalError("unsupported type %s in LogVal::REad", type_name(type));
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -452,7 +452,7 @@ bool LogMgr::CreateStream(EnumVal* id, RecordVal* sval)
|
|||
|
||||
if ( ! same_type(rtype, BifType::Record::Log::Stream, 0) )
|
||||
{
|
||||
bro_logger->Error("sval argument not of right type");
|
||||
reporter->Error("sval argument not of right type");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -468,7 +468,7 @@ bool LogMgr::CreateStream(EnumVal* id, RecordVal* sval)
|
|||
|
||||
if ( ! LogVal::IsCompatibleType(columns->FieldType(i)) )
|
||||
{
|
||||
bro_logger->Error("type of field '%s' is not support for logging output",
|
||||
reporter->Error("type of field '%s' is not support for logging output",
|
||||
columns->FieldName(i));
|
||||
|
||||
return false;
|
||||
|
@ -479,7 +479,7 @@ bool LogMgr::CreateStream(EnumVal* id, RecordVal* sval)
|
|||
|
||||
if ( ! log_attr_present )
|
||||
{
|
||||
bro_logger->Error("logged record type does not have any &log attributes");
|
||||
reporter->Error("logged record type does not have any &log attributes");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -493,7 +493,7 @@ bool LogMgr::CreateStream(EnumVal* id, RecordVal* sval)
|
|||
|
||||
if ( ! etype->IsEvent() )
|
||||
{
|
||||
bro_logger->Error("stream event is a function, not an event");
|
||||
reporter->Error("stream event is a function, not an event");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -501,13 +501,13 @@ bool LogMgr::CreateStream(EnumVal* id, RecordVal* sval)
|
|||
|
||||
if ( args->length() != 1 )
|
||||
{
|
||||
bro_logger->Error("stream event must take a single argument");
|
||||
reporter->Error("stream event must take a single argument");
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! same_type((*args)[0], columns) )
|
||||
{
|
||||
bro_logger->Error("stream event's argument type does not match column record type");
|
||||
reporter->Error("stream event's argument type does not match column record type");
|
||||
return new Val(0, TYPE_BOOL);
|
||||
}
|
||||
}
|
||||
|
@ -627,7 +627,7 @@ bool LogMgr::TraverseRecord(Stream* stream, Filter* filter, RecordType* rt,
|
|||
|
||||
else
|
||||
{
|
||||
bro_logger->Error("unsupported field type for log column");
|
||||
reporter->Error("unsupported field type for log column");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -666,7 +666,7 @@ bool LogMgr::TraverseRecord(Stream* stream, Filter* filter, RecordType* rt,
|
|||
|
||||
if ( ! filter->fields )
|
||||
{
|
||||
bro_logger->Error("out of memory in add_filter");
|
||||
reporter->Error("out of memory in add_filter");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -685,7 +685,7 @@ bool LogMgr::AddFilter(EnumVal* id, RecordVal* fval)
|
|||
|
||||
if ( ! same_type(rtype, BifType::Record::Log::Filter, 0) )
|
||||
{
|
||||
bro_logger->Error("filter argument not of right type");
|
||||
reporter->Error("filter argument not of right type");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -835,7 +835,7 @@ bool LogMgr::Write(EnumVal* id, RecordVal* columns)
|
|||
|
||||
if ( ! columns )
|
||||
{
|
||||
bro_logger->Error("incompatible log record type");
|
||||
reporter->Error("incompatible log record type");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -877,7 +877,7 @@ bool LogMgr::Write(EnumVal* id, RecordVal* columns)
|
|||
|
||||
if ( ! v->Type()->Tag() == TYPE_STRING )
|
||||
{
|
||||
bro_logger->Error("path_func did not return string");
|
||||
reporter->Error("path_func did not return string");
|
||||
Unref(v);
|
||||
return false;
|
||||
}
|
||||
|
@ -1061,7 +1061,7 @@ LogVal* LogMgr::ValToLogVal(Val* val, BroType* ty)
|
|||
}
|
||||
|
||||
default:
|
||||
bro_logger->InternalError("unsupported type for log_write");
|
||||
reporter->InternalError("unsupported type for log_write");
|
||||
}
|
||||
|
||||
return lval;
|
||||
|
@ -1126,7 +1126,7 @@ LogWriter* LogMgr::CreateWriter(EnumVal* id, EnumVal* writer, string path,
|
|||
{
|
||||
if ( ld->type == BifEnum::Log::WRITER_DEFAULT )
|
||||
{
|
||||
bro_logger->Error("unknow writer when creating writer");
|
||||
reporter->Error("unknow writer when creating writer");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1285,7 +1285,7 @@ bool LogMgr::Flush(EnumVal* id)
|
|||
|
||||
void LogMgr::Error(LogWriter* writer, const char* msg)
|
||||
{
|
||||
bro_logger->Error(fmt("error with writer for %s: %s",
|
||||
reporter->Error(fmt("error with writer for %s: %s",
|
||||
writer->Path().c_str(), msg));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue