diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2013-04-08 19:17:36 +0200 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2013-05-06 16:28:13 +0200 |
commit | 4f8615ee8b75329e7d3204e57e10b48294c6998c (patch) | |
tree | 19c3946529fbf89a0aceb21d7cbeae8b20a72b31 /test | |
parent | b5befe6cbf450346678a9a5d79ba885be9bd5dab (diff) |
Logging: eliminate _instance from SE_LOG* macros
With the _instance parameter always being NULL thanks to the previous
patch, it can be removed completely.
Diffstat (limited to 'test')
-rw-r--r-- | test/ClientTest.cpp | 26 | ||||
-rw-r--r-- | test/ClientTest.h | 2 | ||||
-rw-r--r-- | test/ClientTestAssert.h | 8 | ||||
-rw-r--r-- | test/client-test-main.cpp | 6 |
4 files changed, 21 insertions, 21 deletions
diff --git a/test/ClientTest.cpp b/test/ClientTest.cpp index 6bbc3223..305ea27d 100644 --- a/test/ClientTest.cpp +++ b/test/ClientTest.cpp @@ -4219,7 +4219,7 @@ bool SyncTests::doConversionCallback(bool *success, type.c_str(), type.c_str(), convertedItem)) { - SE_LOG_ERROR(NULL, NULL, "failed parsing as %s:\n%s", + SE_LOG_ERROR(NULL, "failed parsing as %s:\n%s", type.c_str(), item.c_str()); } else { @@ -5198,7 +5198,7 @@ public: virtual void send(const char *data, size_t len) { if (m_interruptAtMessage == m_messageCount) { - SE_LOG_DEBUG(NULL, NULL, "TransportFaultInjector: interrupt before sending message #%d", m_messageCount); + SE_LOG_DEBUG(NULL, "TransportFaultInjector: interrupt before sending message #%d", m_messageCount); } m_messageCount++; if (m_interruptAtMessage >= 0 && @@ -5211,7 +5211,7 @@ public: m_status = m_wrappedAgent->wait(); if (m_interruptAtMessage == m_messageCount) { - SE_LOG_DEBUG(NULL, NULL, "TransportFaultInjector: interrupt after receiving reply #%d", m_messageCount); + SE_LOG_DEBUG(NULL, "TransportFaultInjector: interrupt after receiving reply #%d", m_messageCount); } m_messageCount++; if (m_interruptAtMessage >= 0 && @@ -5275,7 +5275,7 @@ public: m_interruptAtMessage < m_messageCount && m_interruptAtMessage >= m_messageCount - 3) { int offset = m_interruptAtMessage - m_messageCount + 4; - SE_LOG_DEBUG(NULL, NULL, "TransportResendProxy: interrupt %s", + SE_LOG_DEBUG(NULL, "TransportResendProxy: interrupt %s", offset == 1 ? "before sending message" : offset == 2 ? "directly after sending message" : "after receiving reply"); @@ -5324,7 +5324,7 @@ public: len = 0; } else { if (m_interruptAtMessage == m_messageCount) { - SE_LOG_DEBUG(NULL, NULL, "UserSuspendInjector: user suspend after getting reply #%d", m_messageCount); + SE_LOG_DEBUG(NULL, "UserSuspendInjector: user suspend after getting reply #%d", m_messageCount); } m_messageCount++; if (m_interruptAtMessage >= 0 && @@ -5911,7 +5911,7 @@ void SyncTests::doSync(const SyncOptions &options) simplifyFilename(logname); syncCounter++; - SE_LOG_DEBUG(NULL, NULL, "%d. starting %s with sync mode %s", + SE_LOG_DEBUG(NULL, "%d. starting %s with sync mode %s", syncCounter, logname.c_str(), PrettyPrintSyncMode(options.m_syncMode).c_str()); try { @@ -6212,7 +6212,7 @@ std::string ClientTest::import(ClientTest &client, TestingSyncSource &source, co { list<string> items; getItems(file, items, realfile); - SE_LOG_DEBUG(NULL, NULL, "importing %d test cases from file %s", (int)items.size(), realfile.c_str()); + SE_LOG_DEBUG(NULL, "importing %d test cases from file %s", (int)items.size(), realfile.c_str()); std::string failures; bool doImport = !luids || luids->empty(); std::list<std::string>::const_iterator it; @@ -6498,7 +6498,7 @@ static std::string additionalYearly(const std::string &single, } - SE_LOG_DEBUG(NULL, NULL, "additional yearly: start %d, skip %d, index %d/%d:\n%s", + SE_LOG_DEBUG(NULL, "additional yearly: start %d, skip %d, index %d/%d:\n%s", start, skip, index, total, event.c_str()); return event; @@ -6540,7 +6540,7 @@ static std::string additionalMonthly(const std::string &single, } } - SE_LOG_DEBUG(NULL, NULL, "additional monthly: start %d, skip %d, index %d/%d:\n%s", + SE_LOG_DEBUG(NULL, "additional monthly: start %d, skip %d, index %d/%d:\n%s", start, skip, index, total, event.c_str()); return event; @@ -6662,7 +6662,7 @@ static std::string additionalWeekly(const std::string &single, } } - SE_LOG_DEBUG(NULL, NULL, "additional weekly: start %d, skip %d, index %d/%d:\n%s", + SE_LOG_DEBUG(NULL, "additional weekly: start %d, skip %d, index %d/%d:\n%s", start, skip, index, total, event.c_str()); return event; @@ -7711,7 +7711,7 @@ void CheckSyncReport::check(SyncMLStatus status, SyncReport &report) const serverAdded, serverUpdated, serverDeleted); str << "Expected sync mode: " << PrettyPrintSyncMode(syncMode) << "\n"; str << "Expected cycles: " << restarts + 1 << "\n"; - SE_LOG_INFO(NULL, NULL, "sync report:\n%s\n", str.str().c_str()); + SE_LOG_INFO(NULL, "sync report:\n%s\n", str.str().c_str()); if (mustSucceed) { // both STATUS_OK and STATUS_HTTP_OK map to the same @@ -7725,13 +7725,13 @@ void CheckSyncReport::check(SyncMLStatus status, SyncReport &report) const const std::string &name = entry.first; const SyncSourceReport &source = entry.second; - SE_LOG_DEBUG(NULL, NULL, "Checking sync source %s...", name.c_str()); + SE_LOG_DEBUG(NULL, "Checking sync source %s...", name.c_str()); if (mustSucceed) { CLIENT_TEST_EQUAL(name, STATUS_OK, source.getStatus()); } check(name, source); } - SE_LOG_DEBUG(NULL, NULL, "Done with checking sync report."); + SE_LOG_DEBUG(NULL, "Done with checking sync report."); } void CheckSyncReport::check(const std::string &name, const SyncSourceReport &source) const diff --git a/test/ClientTest.h b/test/ClientTest.h index d3665b37..7fa37a22 100644 --- a/test/ClientTest.h +++ b/test/ClientTest.h @@ -974,7 +974,7 @@ public: /** write log message into *.log file of a test */ #define CLIENT_TEST_LOG(_format, _args...) \ - SE_LOG_DEBUG(NULL, NULL, "\n%s:%d *** " _format, \ + SE_LOG_DEBUG(NULL, "\n%s:%d *** " _format, \ getBasename(__FILE__).c_str(), __LINE__, \ ##_args) diff --git a/test/ClientTestAssert.h b/test/ClientTestAssert.h index 35e81e43..defdb0ac 100644 --- a/test/ClientTestAssert.h +++ b/test/ClientTestAssert.h @@ -99,9 +99,9 @@ static void inline ClientTestExceptionHandle(const char *file, int line, const s #define CT_WRAP_ASSERT(_file, _line, _assert) \ do { \ try { \ - SE_LOG_DEBUG(NULL, NULL, "%s:%d: starting %s", getBasename(_file).c_str(), _line, #_assert); \ + SE_LOG_DEBUG(NULL, "%s:%d: starting %s", getBasename(_file).c_str(), _line, #_assert); \ _assert; \ - SE_LOG_DEBUG(NULL, NULL, "%s:%d: ending %s", getBasename(_file).c_str(), _line, #_assert); \ + SE_LOG_DEBUG(NULL, "%s:%d: ending %s", getBasename(_file).c_str(), _line, #_assert); \ } catch (...) { \ ClientTestExceptionHandle(_file, _line); \ } \ @@ -110,12 +110,12 @@ static void inline ClientTestExceptionHandle(const char *file, int line, const s #define CT_WRAP_ASSERT_MESSAGE(_file, _line, _message, _assert) \ do { \ try { \ - SE_LOG_DEBUG(NULL, NULL, "%s:%d: starting %s %s", \ + SE_LOG_DEBUG(NULL, "%s:%d: starting %s %s", \ getBasename(_file).c_str(), _line, \ std::string(_message).c_str(), \ #_assert); \ _assert; \ - SE_LOG_DEBUG(NULL, NULL, "%s:%d: ending %s", getBasename(_file).c_str(), _line, #_assert); \ + SE_LOG_DEBUG(NULL, "%s:%d: ending %s", getBasename(_file).c_str(), _line, #_assert); \ } catch (...) { \ ClientTestExceptionHandle(_file, _line, _message); \ } \ diff --git a/test/client-test-main.cpp b/test/client-test-main.cpp index cc078aa7..b5f9ed5f 100644 --- a/test/client-test-main.cpp +++ b/test/client-test-main.cpp @@ -142,7 +142,7 @@ public: m_logger->setLevel(Logger::DEBUG); LoggerBase::pushLogger(m_logger.get()); } - SE_LOG_DEBUG(NULL, NULL, "*** starting %s ***", m_currentTest.c_str()); + SE_LOG_DEBUG(NULL, "*** starting %s ***", m_currentTest.c_str()); m_failures.reset(); m_testFailed = false; @@ -188,9 +188,9 @@ public: result = "okay"; } - SE_LOG_DEBUG(NULL, NULL, "*** ending %s: %s ***", m_currentTest.c_str(), result.c_str()); + SE_LOG_DEBUG(NULL, "*** ending %s: %s ***", m_currentTest.c_str(), result.c_str()); if (!failure.empty()) { - SE_LOG_ERROR(NULL, NULL, "%s", failure.c_str()); + SE_LOG_ERROR(NULL, "%s", failure.c_str()); } if (&LoggerBase::instance() == m_logger.get()) { LoggerBase::popLogger(); |