From 9f522466f0529e4fc56abc0ebf2d952e82d39e89 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Fri, 28 Aug 2020 17:52:13 +0200 Subject: [PATCH] wrapped info output in additonal ifdef --- events/EventManager.cpp | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/events/EventManager.cpp b/events/EventManager.cpp index 5848dd74..d459fa4c 100644 --- a/events/EventManager.cpp +++ b/events/EventManager.cpp @@ -111,25 +111,27 @@ ReturnValue_t EventManager::unsubscribeFromEventRange(MessageQueueId_t listener, #ifdef DEBUG -//forward declaration, should be implemented by mission -const char* translateObject(object_id_t object); -const char * translateEvents(Event event); +// forward declaration, should be implemented by mission +extern const char* translateObject(object_id_t object); +extern const char* translateEvents(Event event); void EventManager::printEvent(EventMessage* message) { const char *string = 0; switch (message->getSeverity()) { case SEVERITY::INFO: -// string = translateObject(message->getReporter()); -// sif::info << "EVENT: "; -// if (string != 0) { -// sif::info << string; -// } else { -// sif::info << "0x" << std::hex << message->getReporter() << std::dec; -// } -// sif::info << " reported " << translateEvents(message->getEvent()) << " (" -// << std::dec << message->getEventId() << std::hex << ") P1: 0x" -// << message->getParameter1() << " P2: 0x" -// << message->getParameter2() << std::dec << std::endl; +#ifdef DEBUG_INFO_EVENT + string = translateObject(message->getReporter()); + sif::info << "EVENT: "; + if (string != 0) { + sif::info << string; + } else { + sif::info << "0x" << std::hex << message->getReporter() << std::dec; + } + sif::info << " reported " << translateEvents(message->getEvent()) << " (" + << std::dec << message->getEventId() << std::hex << ") P1: 0x" + << message->getParameter1() << " P2: 0x" + << message->getParameter2() << std::dec << std::endl; +#endif break; default: string = translateObject(message->getReporter()); @@ -152,7 +154,6 @@ void EventManager::printEvent(EventMessage* message) { << std::endl; break; } - } #endif