diff --git a/aux/broccoli b/aux/broccoli index 5f04d82f88..9866a00e78 160000 --- a/aux/broccoli +++ b/aux/broccoli @@ -1 +1 @@ -Subproject commit 5f04d82f88e619e25f63db651d0ac887c448d85d +Subproject commit 9866a00e78b088315e632960aaa230635bca326a diff --git a/aux/btest b/aux/btest index 2c47f028b5..a9aeb2e1a8 160000 --- a/aux/btest +++ b/aux/btest @@ -1 +1 @@ -Subproject commit 2c47f028b5bf2f9477d0b42cd7fb96277adb1f85 +Subproject commit a9aeb2e1a8434c583c75f5941b58dc69a7517444 diff --git a/src/Net.cc b/src/Net.cc index e2c9854785..c007760aca 100644 --- a/src/Net.cc +++ b/src/Net.cc @@ -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(); } diff --git a/src/PersistenceSerializer.cc b/src/PersistenceSerializer.cc index 3b733986b0..60247c7519 100644 --- a/src/PersistenceSerializer.cc +++ b/src/PersistenceSerializer.cc @@ -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); } diff --git a/src/PktSrc.cc b/src/PktSrc.cc index 050b58b508..7e178d69e2 100644 --- a/src/PktSrc.cc +++ b/src/PktSrc.cc @@ -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; diff --git a/src/Reporter.cc b/src/Reporter.cc index 6dd3c00d0f..17c6744a89 100644 --- a/src/Reporter.cc +++ b/src/Reporter.cc @@ -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); } diff --git a/src/Reporter.h b/src/Reporter.h index ff1ceecd61..6cadd3fb5b 100644 --- a/src/Reporter.h +++ b/src/Reporter.h @@ -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, ...); diff --git a/src/Val.cc b/src/Val.cc index 5ad77b5aef..3aaf0d7bf0 100644 --- a/src/Val.cc +++ b/src/Val.cc @@ -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; } } diff --git a/src/event.bif b/src/event.bif index bd949f0854..96113980c1 100644 --- a/src/event.bif +++ b/src/event.bif @@ -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; diff --git a/src/main.cc b/src/main.cc index 4d40dee9b7..3cba66d248 100644 --- a/src/main.cc +++ b/src/main.cc @@ -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; diff --git a/src/reporter.bif b/src/reporter.bif index 4bbdede145..4a77c2fcda 100644 --- a/src/reporter.bif +++ b/src/reporter.bif @@ -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); %} diff --git a/testing/btest/Baseline/core.reporter/logger-test.log b/testing/btest/Baseline/core.reporter/logger-test.log index 7e62352088..6f7ba1d8c7 100644 --- a/testing/btest/Baseline/core.reporter/logger-test.log +++ b/testing/btest/Baseline/core.reporter/logger-test.log @@ -1,6 +1,6 @@ -reporter_message|init test-message|/da/home/robin/bro/seth/testing/btest/.tmp/core.reporter/reporter.bro, line 8|0.000000 -reporter_warning|init test-warning|/da/home/robin/bro/seth/testing/btest/.tmp/core.reporter/reporter.bro, line 9|0.000000 -reporter_error|init test-error|/da/home/robin/bro/seth/testing/btest/.tmp/core.reporter/reporter.bro, line 10|0.000000 -reporter_message|done test-message|/da/home/robin/bro/seth/testing/btest/.tmp/core.reporter/reporter.bro, line 15|0.000000 -reporter_warning|done test-warning|/da/home/robin/bro/seth/testing/btest/.tmp/core.reporter/reporter.bro, line 16|0.000000 -reporter_error|done test-error|/da/home/robin/bro/seth/testing/btest/.tmp/core.reporter/reporter.bro, line 17|0.000000 +reporter_info|init test-info|/da/home/robin/bro/master/testing/btest/.tmp/core.reporter/reporter.bro, line 8|0.000000 +reporter_warning|init test-warning|/da/home/robin/bro/master/testing/btest/.tmp/core.reporter/reporter.bro, line 9|0.000000 +reporter_error|init test-error|/da/home/robin/bro/master/testing/btest/.tmp/core.reporter/reporter.bro, line 10|0.000000 +reporter_info|done test-info|/da/home/robin/bro/master/testing/btest/.tmp/core.reporter/reporter.bro, line 15|0.000000 +reporter_warning|done test-warning|/da/home/robin/bro/master/testing/btest/.tmp/core.reporter/reporter.bro, line 16|0.000000 +reporter_error|done test-error|/da/home/robin/bro/master/testing/btest/.tmp/core.reporter/reporter.bro, line 17|0.000000 diff --git a/testing/btest/Baseline/core.reporter/output b/testing/btest/Baseline/core.reporter/output index 3f18d9bbc1..2735adc931 100644 --- a/testing/btest/Baseline/core.reporter/output +++ b/testing/btest/Baseline/core.reporter/output @@ -1,3 +1,3 @@ -/da/home/robin/bro/seth/testing/btest/.tmp/core.reporter/reporter.bro, line 52: pre test-message -warning in /da/home/robin/bro/seth/testing/btest/.tmp/core.reporter/reporter.bro, line 53: pre test-warning -error in /da/home/robin/bro/seth/testing/btest/.tmp/core.reporter/reporter.bro, line 54: pre test-error +/da/home/robin/bro/master/testing/btest/.tmp/core.reporter/reporter.bro, line 52: pre test-info +warning in /da/home/robin/bro/master/testing/btest/.tmp/core.reporter/reporter.bro, line 53: pre test-warning +error in /da/home/robin/bro/master/testing/btest/.tmp/core.reporter/reporter.bro, line 54: pre test-error diff --git a/testing/btest/core/reporter.bro b/testing/btest/core/reporter.bro index 70bb0b665c..aa660ef495 100644 --- a/testing/btest/core/reporter.bro +++ b/testing/btest/core/reporter.bro @@ -5,14 +5,14 @@ event bro_init() { - Reporter::message("init test-message"); + Reporter::info("init test-info"); Reporter::warning("init test-warning"); Reporter::error("init test-error"); } event bro_done() { - Reporter::message("done test-message"); + Reporter::info("done test-info"); Reporter::warning("done test-warning"); Reporter::error("done test-error"); } @@ -26,7 +26,7 @@ event connection_established(c: connection) print "established"; - Reporter::message("processing test-message"); + Reporter::info("processing test-info"); Reporter::warning("processing test-warning"); Reporter::error("processing test-error"); first = 0; @@ -34,9 +34,9 @@ event connection_established(c: connection) global f = open_log_file("logger-test"); -event reporter_message(t: time, msg: string, location: string) +event reporter_info(t: time, msg: string, location: string) { - print f, fmt("reporter_message|%s|%s|%.6f", msg, location, t); + print f, fmt("reporter_info|%s|%s|%.6f", msg, location, t); } event reporter_warning(t: time, msg: string, location: string) @@ -49,7 +49,7 @@ event reporter_error(t: time, msg: string, location: string) print f, fmt("reporter_error|%s|%s|%.6f", msg, location, t); } -Reporter::message("pre test-message"); +Reporter::info("pre test-info"); Reporter::warning("pre test-warning"); Reporter::error("pre test-error");