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:
Robin Sommer 2011-07-01 09:22:33 -07:00
parent 93894eed9b
commit 66e2c3b623
123 changed files with 722 additions and 713 deletions

View file

@ -13,7 +13,7 @@
#include "RemoteSerializer.h"
#include "Conn.h"
#include "Event.h"
#include "Logger.h"
#include "Reporter.h"
#include "Net.h"
class IncrementalWriteTimer : public Timer {
@ -189,7 +189,7 @@ void PersistenceSerializer::RaiseFinishedSendState()
vl->append(new PortVal(remote_port));
mgr.QueueEvent(finished_send_state, vl);
bro_logger->Log("Serialization done.");
reporter->Log("Serialization done.");
}
#endif
@ -213,7 +213,7 @@ void PersistenceSerializer::GotStateAccess(StateAccess* s)
void PersistenceSerializer::GotTimer(Timer* s)
{
bro_logger->Error("PersistenceSerializer::GotTimer not implemented");
reporter->Error("PersistenceSerializer::GotTimer not implemented");
}
void PersistenceSerializer::GotConnection(Connection* c)
@ -228,7 +228,7 @@ void PersistenceSerializer::GotID(ID* id, Val* /* val */)
void PersistenceSerializer::GotPacket(Packet* p)
{
bro_logger->Error("PersistenceSerializer::GotPacket not implemented");
reporter->Error("PersistenceSerializer::GotPacket not implemented");
}
bool PersistenceSerializer::LogAccess(const StateAccess& s)
@ -286,7 +286,7 @@ bool PersistenceSerializer::SendState(SourceID peer, bool may_suspend)
status->conns = &persistent_conns;
status->peer = peer;
bro_logger->Message("Sending state...");
reporter->Message("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;
bro_logger->Message("Sending config...");
reporter->Message("Sending config...");
return RunSerialization(status);
}
@ -319,7 +319,7 @@ bool PersistenceSerializer::RunSerialization(SerialStatus* status)
{
if ( running[i]->type == status->type )
{
bro_logger->Warning("Serialization of type %d already running.", status->type);
reporter->Warning("Serialization of type %d already running.", status->type);
return false;
}
}
@ -381,14 +381,14 @@ bool PersistenceSerializer::RunSerialization(SerialStatus* status)
}
else
bro_logger->InternalError("unknown suspend state");
reporter->InternalError("unknown suspend state");
}
else if ( cont->Resuming() )
cont->Resume();
else
bro_logger->InternalError("unknown continuation state");
reporter->InternalError("unknown continuation state");
if ( status->id_cookie )
{
@ -504,7 +504,7 @@ bool PersistenceSerializer::DoIDSerialization(SerialStatus* status, ID* id)
break;
default:
bro_logger->InternalError("unknown serialization type");
reporter->InternalError("unknown serialization type");
}
return success;
@ -535,7 +535,7 @@ bool PersistenceSerializer::DoConnSerialization(SerialStatus* status,
break;
default:
bro_logger->InternalError("unknown serialization type");
reporter->InternalError("unknown serialization type");
}
return success;
@ -560,7 +560,7 @@ bool PersistenceSerializer::DoAccessSerialization(SerialStatus* status,
break;
default:
bro_logger->InternalError("unknown serialization type");
reporter->InternalError("unknown serialization type");
}
return success;