From 5006adedfecedd16c07543d32acffe36aeaf61bb Mon Sep 17 00:00:00 2001 From: "Jerry (Xinyu Hou)" Date: Mon, 1 Jun 2015 14:46:08 -0700 Subject: [PATCH] Changed note to notify #4745 --- .../MSWindowsClientTaskBarReceiver.cpp | 2 +- .../MSWindowsPortableTaskBarReceiver.cpp | 2 +- .../MSWindowsServerTaskBarReceiver.cpp | 2 +- src/lib/base/ELevel.h | 2 +- src/lib/base/Log.h | 2 +- .../unittests/ipc/IpcLogOutputterTests.cpp | 30 +++++++++---------- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/cmd/synergyc/MSWindowsClientTaskBarReceiver.cpp b/src/cmd/synergyc/MSWindowsClientTaskBarReceiver.cpp index 7455d8c7..965d9eef 100644 --- a/src/cmd/synergyc/MSWindowsClientTaskBarReceiver.cpp +++ b/src/cmd/synergyc/MSWindowsClientTaskBarReceiver.cpp @@ -187,7 +187,7 @@ MSWindowsClientTaskBarReceiver::runMenu(int x, int y) break; case IDC_TASKBAR_LOG_LEVEL_NOTE: - CLOG->setFilter(kNOTE); + CLOG->setFilter(kNOTIFY); break; case IDC_TASKBAR_LOG_LEVEL_INFO: diff --git a/src/cmd/synergyp/MSWindowsPortableTaskBarReceiver.cpp b/src/cmd/synergyp/MSWindowsPortableTaskBarReceiver.cpp index c09234a2..3a6b4c5e 100644 --- a/src/cmd/synergyp/MSWindowsPortableTaskBarReceiver.cpp +++ b/src/cmd/synergyp/MSWindowsPortableTaskBarReceiver.cpp @@ -204,7 +204,7 @@ MSWindowsPortableTaskBarReceiver::runMenu(int x, int y) break; case IDC_TASKBAR_LOG_LEVEL_NOTE: - CLOG->setFilter(kNOTE); + CLOG->setFilter(kNOTIFY); break; case IDC_TASKBAR_LOG_LEVEL_INFO: diff --git a/src/cmd/synergys/MSWindowsServerTaskBarReceiver.cpp b/src/cmd/synergys/MSWindowsServerTaskBarReceiver.cpp index d7ced073..83c73ce3 100644 --- a/src/cmd/synergys/MSWindowsServerTaskBarReceiver.cpp +++ b/src/cmd/synergys/MSWindowsServerTaskBarReceiver.cpp @@ -218,7 +218,7 @@ MSWindowsServerTaskBarReceiver::runMenu(int x, int y) break; case IDC_TASKBAR_LOG_LEVEL_NOTE: - CLOG->setFilter(kNOTE); + CLOG->setFilter(kNOTIFY); break; case IDC_TASKBAR_LOG_LEVEL_INFO: diff --git a/src/lib/base/ELevel.h b/src/lib/base/ELevel.h index c489dffd..6c66df6f 100644 --- a/src/lib/base/ELevel.h +++ b/src/lib/base/ELevel.h @@ -27,7 +27,7 @@ enum ELevel { kFATAL, //!< For fatal errors kERROR, //!< For serious errors kWARNING, //!< For minor errors and warnings - kNOTE, //!< For messages about notable events + kNOTIFY, //!< For messages about notable events kINFO, //!< For informational messages kDEBUG, //!< For important debugging messages kDEBUG1, //!< For verbosity +1 debugging messages diff --git a/src/lib/base/Log.h b/src/lib/base/Log.h index eaa2c8a8..09766130 100644 --- a/src/lib/base/Log.h +++ b/src/lib/base/Log.h @@ -203,7 +203,7 @@ otherwise it expands to a call that doesn't. #define CLOG_CRIT CLOG_TRACE "%z\060" // char is '0' #define CLOG_ERR CLOG_TRACE "%z\061" #define CLOG_WARN CLOG_TRACE "%z\062" -#define CLOG_NOTE CLOG_TRACE "%z\063" +#define CLOG_NOTIFY CLOG_TRACE "%z\063" #define CLOG_INFO CLOG_TRACE "%z\064" #define CLOG_DEBUG CLOG_TRACE "%z\065" #define CLOG_DEBUG1 CLOG_TRACE "%z\066" diff --git a/src/test/unittests/ipc/IpcLogOutputterTests.cpp b/src/test/unittests/ipc/IpcLogOutputterTests.cpp index 9233256b..404c1a1a 100644 --- a/src/test/unittests/ipc/IpcLogOutputterTests.cpp +++ b/src/test/unittests/ipc/IpcLogOutputterTests.cpp @@ -57,9 +57,9 @@ TEST(IpcLogOutputterTests, write_threadingEnabled_bufferIsSent) EXPECT_CALL(mockServer, send(IpcLogLineMessageEq("mock 2\n"), _)).Times(1); IpcLogOutputter outputter(mockServer, true); - outputter.write(kNOTE, "mock 1"); + outputter.write(kNOTIFY, "mock 1"); mockServer.waitForSend(); - outputter.write(kNOTE, "mock 2"); + outputter.write(kNOTIFY, "mock 2"); mockServer.waitForSend(); } @@ -76,9 +76,9 @@ TEST(IpcLogOutputterTests, write_overBufferMaxSize_firstLineTruncated) outputter.bufferMaxSize(2); // log more lines than the buffer can contain - outputter.write(kNOTE, "mock 1"); - outputter.write(kNOTE, "mock 2"); - outputter.write(kNOTE, "mock 3"); + outputter.write(kNOTIFY, "mock 1"); + outputter.write(kNOTIFY, "mock 2"); + outputter.write(kNOTIFY, "mock 3"); outputter.sendBuffer(); } @@ -95,8 +95,8 @@ TEST(IpcLogOutputterTests, write_underBufferMaxSize_allLinesAreSent) outputter.bufferMaxSize(2); // log more lines than the buffer can contain - outputter.write(kNOTE, "mock 1"); - outputter.write(kNOTE, "mock 2"); + outputter.write(kNOTIFY, "mock 1"); + outputter.write(kNOTIFY, "mock 2"); outputter.sendBuffer(); } @@ -114,8 +114,8 @@ TEST(IpcLogOutputterTests, write_overBufferRateLimit_lastLineTruncated) outputter.bufferRateLimit(1, 0.001); // 1ms // log 1 more line than the buffer can accept in time limit. - outputter.write(kNOTE, "mock 1"); - outputter.write(kNOTE, "mock 2"); + outputter.write(kNOTIFY, "mock 1"); + outputter.write(kNOTIFY, "mock 2"); outputter.sendBuffer(); // after waiting the time limit send another to make sure @@ -123,8 +123,8 @@ TEST(IpcLogOutputterTests, write_overBufferRateLimit_lastLineTruncated) // HACK: sleep causes the unit test to fail intermittently, // so lets try 100ms (there must be a better way to solve this) ARCH->sleep(0.1); // 100ms - outputter.write(kNOTE, "mock 3"); - outputter.write(kNOTE, "mock 4"); + outputter.write(kNOTIFY, "mock 3"); + outputter.write(kNOTIFY, "mock 4"); outputter.sendBuffer(); } @@ -142,14 +142,14 @@ TEST(IpcLogOutputterTests, write_underBufferRateLimit_allLinesAreSent) outputter.bufferRateLimit(4, 1); // 1s (should be plenty of time) // log 1 more line than the buffer can accept in time limit. - outputter.write(kNOTE, "mock 1"); - outputter.write(kNOTE, "mock 2"); + outputter.write(kNOTIFY, "mock 1"); + outputter.write(kNOTIFY, "mock 2"); outputter.sendBuffer(); // after waiting the time limit send another to make sure // we can log after the time limit passes. - outputter.write(kNOTE, "mock 3"); - outputter.write(kNOTE, "mock 4"); + outputter.write(kNOTIFY, "mock 3"); + outputter.write(kNOTIFY, "mock 4"); outputter.sendBuffer(); }