Renaming reporter_message to report_info.

Same change internally.
This commit is contained in:
Robin Sommer 2011-07-07 08:43:29 -07:00
parent eb0580c622
commit df1b2f922b
14 changed files with 34 additions and 34 deletions

View file

@ -537,7 +537,7 @@ void net_get_final_stats()
{
struct PktSrc::Stats s;
ps->Statistics(&s);
reporter->Message("%d packets received on interface %s, %d dropped\n",
reporter->Info("%d packets received on interface %s, %d dropped\n",
s.received, ps->Interface(), s.dropped);
}
}
@ -611,7 +611,7 @@ static double suspend_start = 0;
void net_suspend_processing()
{
if ( _processing_suspended == 0 )
reporter->Message("processing suspended");
reporter->Info("processing suspended");
++_processing_suspended;
}
@ -620,7 +620,7 @@ void net_continue_processing()
{
if ( _processing_suspended == 1 )
{
reporter->Message("processing continued");
reporter->Info("processing continued");
loop_over_list(pkt_srcs, i)
pkt_srcs[i]->ContinueAfterSuspend();
}

View file

@ -286,7 +286,7 @@ bool PersistenceSerializer::SendState(SourceID peer, bool may_suspend)
status->conns = &persistent_conns;
status->peer = peer;
reporter->Message("Sending state...");
reporter->Info("Sending state...");
return RunSerialization(status);
}
@ -301,7 +301,7 @@ bool PersistenceSerializer::SendConfig(SourceID peer, bool may_suspend)
status->ids = global_scope()->GetIDs();
status->peer = peer;
reporter->Message("Sending config...");
reporter->Info("Sending config...");
return RunSerialization(status);
}

View file

@ -463,7 +463,7 @@ PktInterfaceSrc::PktInterfaceSrc(const char* arg_interface, const char* filter,
// ### This needs autoconf'ing.
#ifdef HAVE_PCAP_INT_H
reporter->Message("pcap bufsize = %d\n", ((struct pcap *) pd)->bufsize);
reporter->Info("pcap bufsize = %d\n", ((struct pcap *) pd)->bufsize);
#endif
#ifdef HAVE_LINUX
@ -486,7 +486,7 @@ PktInterfaceSrc::PktInterfaceSrc(const char* arg_interface, const char* filter,
// Couldn't get header size.
return;
reporter->Message("listening on %s\n", interface);
reporter->Info("listening on %s\n", interface);
}
else
closed = true;

View file

@ -35,11 +35,11 @@ Reporter::~Reporter()
closelog();
}
void Reporter::Message(const char* fmt, ...)
void Reporter::Info(const char* fmt, ...)
{
va_list ap;
va_start(ap, fmt);
DoLog("", reporter_message, stderr, 0, 0, true, true, fmt, ap);
DoLog("", reporter_info, stderr, 0, 0, true, true, fmt, ap);
va_end(ap);
}

View file

@ -22,7 +22,7 @@ public:
// Report an informational message, nothing that needs specific
// attention.
void Message(const char* fmt, ...);
void Info(const char* fmt, ...);
// Report a warning that may indicate a problem.
void Warning(const char* fmt, ...);

View file

@ -2695,7 +2695,7 @@ bool TableVal::DoSerialize(SerialInfo* info) const
{
info->cont.SaveState(state);
info->cont.Suspend();
reporter->Message("TableVals serialization suspended right in the middle.");
reporter->Info("TableVals serialization suspended right in the middle.");
return true;
}
}

View file

@ -477,6 +477,6 @@ event netflow_v5_record%(r: nf_v5_record%);
# Different types of reporter messages. These won't be called
# recursively.
event reporter_message%(t: time, msg: string, location: string%) &error_handler;
event reporter_info%(t: time, msg: string, location: string%) &error_handler;
event reporter_warning%(t: time, msg: string, location: string%) &error_handler;
event reporter_error%(t: time, msg: string, location: string%) &error_handler;

View file

@ -299,7 +299,7 @@ void termination_signal()
set_processing_status("TERMINATING", "termination_signal");
Val sval(signal_val, TYPE_COUNT);
reporter->Message("received termination signal");
reporter->Info("received termination signal");
net_get_final_stats();
done_with_network();
net_delete();
@ -943,9 +943,9 @@ int main(int argc, char** argv)
if ( alive_handlers->length() > 0 && dump_used_event_handlers )
{
reporter->Message("invoked event handlers:");
reporter->Info("invoked event handlers:");
for ( int i = 0; i < alive_handlers->length(); ++i )
reporter->Message((*alive_handlers)[i]);
reporter->Info((*alive_handlers)[i]);
}
delete alive_handlers;

View file

@ -5,10 +5,10 @@ module Reporter;
#include "NetVar.h"
%%}
function Reporter::message%(msg: string%): bool
function Reporter::info%(msg: string%): bool
%{
reporter->PushLocation(frame->GetCall()->GetLocationInfo());
reporter->Message("%s", msg->CheckString());
reporter->Info("%s", msg->CheckString());
reporter->PopLocation();
return new Val(1, TYPE_BOOL);
%}