Fix log level from error to warn for normal cases 68/316368/4
authorYonggoo Kang <ygace.kang@samsung.com>
Tue, 20 Aug 2024 08:16:16 +0000 (17:16 +0900)
committerYonggoo Kang <ygace.kang@samsung.com>
Tue, 20 Aug 2024 09:46:18 +0000 (09:46 +0000)
Change-Id: I9b3bb092355696a2f4f65fd18f3471e870c07ae5

tests/webauthn-manual-test-app/src/common.cpp
tests/webauthn-manual-test-app/src/common.h
tests/webauthn-manual-test-app/src/turn_bluetooth.cpp

index 67ade589e5a92a08211cc1230fce03dce8f93ad9..171535d7f08bbc73865d9ce65fc75665a2e50f2b 100644 (file)
@@ -28,6 +28,8 @@ Buffer ToBuffer(wauthn_const_buffer_s buff) { return Buffer{buff.data, buff.data
 
 void LogDebug(const char *msg) { print_system_log(DLOG_DEBUG, LOG_TAG, "%s", msg); }
 
+void LogWarning(const char *msg) { print_system_log(DLOG_WARN, LOG_TAG, "%s", msg); }
+
 void LogError(const char *msg) { print_system_log(DLOG_ERROR, LOG_TAG, "%s", msg); }
 
 void TestContents::UpdateLinkedData(const wauthn_hybrid_linked_data_s *ld)
index a1793d304bbe78c0e508ba4a1cbc7a5f3c65a401..17ca99bda49fe7a11341319ace5d49dcc845054f 100644 (file)
@@ -48,6 +48,7 @@ extern const std::string QR_CODE_PATH;
 typedef std::vector<uint8_t> Buffer;
 Buffer ToBuffer(wauthn_const_buffer_s buff);
 void LogDebug(const char *msg);
+void LogWarning(const char *msg);
 void LogError(const char *msg);
 
 enum TestState {
index d57969026d3376c2ebaa6904fa8cfbded9c878b4..2e04f7b481d43dd6ef54a7c251b0dd473d0b1317 100644 (file)
@@ -29,7 +29,7 @@ namespace {
 [[nodiscard]] int DoTurnBluetooth(int alreadyDoneError)
 {
     int err;
-    LogError("Turning bluetooth on...");
+    LogWarning("Turning bluetooth on...");
     int res = bt_initialize();
 
     if (res != BT_ERROR_NONE) {
@@ -61,12 +61,12 @@ namespace {
 
     res = bt_adapter_enable();
     if (res == alreadyDoneError) {
-        LogError(" already done...");
+        LogWarning(" already done...");
         res = BT_ERROR_NONE;
         goto cleanup_callback;
     }
     if (res != BT_ERROR_NONE) {
-        LogError("enabling adapter failed.");
+        LogError(" enabling adapter failed.");
         goto cleanup_callback;
     }
     // Wait for the callback.
@@ -91,7 +91,7 @@ cleanup_gmainloop:
             res = err;
     }
     if (res == BT_ERROR_NONE)
-        LogError(" done.");
+        LogWarning(" done.");
 
     return res;
 }