diff --git a/internal/crypto/aead.cc b/internal/crypto/aead.cc index 7f74c117..0c611570 100644 --- a/internal/crypto/aead.cc +++ b/internal/crypto/aead.cc @@ -23,6 +23,8 @@ #ifdef NEARBY_CHROMIUM #include "base/check.h" +#elif defined(NEARBY_SWIFTPM) +#include "internal/platform/logging.h" #else #include "absl/log/check.h" #endif diff --git a/internal/crypto/ec_private_key.cc b/internal/crypto/ec_private_key.cc index 8b0dac63..4cc30b48 100644 --- a/internal/crypto/ec_private_key.cc +++ b/internal/crypto/ec_private_key.cc @@ -25,6 +25,8 @@ #ifdef NEARBY_CHROMIUM #include "base/check.h" +#elif defined(NEARBY_SWIFTPM) +#include "internal/platform/logging.h" #else #include "absl/log/check.h" #endif diff --git a/internal/crypto/encryptor.cc b/internal/crypto/encryptor.cc index 0362b36a..c62ce07a 100644 --- a/internal/crypto/encryptor.cc +++ b/internal/crypto/encryptor.cc @@ -24,11 +24,15 @@ #ifdef NEARBY_CHROMIUM #include "base/check.h" +#elif defined(NEARBY_SWIFTPM) +#include "internal/platform/logging.h" #else #include "absl/log/check.h" #endif +#ifndef NEARBY_SWIFTPM #include "absl/log/log.h" +#endif #include "absl/strings/string_view.h" #include "absl/types/span.h" #include "internal/crypto/nearby_base.h" diff --git a/internal/crypto/hkdf.cc b/internal/crypto/hkdf.cc index 3df41b34..e744e05e 100644 --- a/internal/crypto/hkdf.cc +++ b/internal/crypto/hkdf.cc @@ -23,6 +23,8 @@ #ifdef NEARBY_CHROMIUM #include "base/check.h" +#elif defined(NEARBY_SWIFTPM) +#include "internal/platform/logging.h" #else #include "absl/log/check.h" #endif diff --git a/internal/crypto/hmac.cc b/internal/crypto/hmac.cc index 4c2c153c..09444456 100644 --- a/internal/crypto/hmac.cc +++ b/internal/crypto/hmac.cc @@ -21,6 +21,8 @@ #ifdef NEARBY_CHROMIUM #include "base/check.h" +#elif defined(NEARBY_SWIFTPM) +#include "internal/platform/logging.h" #else #include "absl/log/check.h" #endif diff --git a/internal/crypto/nearby_base.cc b/internal/crypto/nearby_base.cc index 39989386..b4c1f9a4 100644 --- a/internal/crypto/nearby_base.cc +++ b/internal/crypto/nearby_base.cc @@ -20,6 +20,8 @@ #ifdef NEARBY_CHROMIUM #include "base/check.h" +#elif defined(NEARBY_SWIFTPM) +#include "internal/platform/logging.h" #else #include "absl/log/check.h" #endif diff --git a/internal/crypto/openssl_util.cc b/internal/crypto/openssl_util.cc index 6b5d099c..ba0784cc 100644 --- a/internal/crypto/openssl_util.cc +++ b/internal/crypto/openssl_util.cc @@ -19,7 +19,11 @@ #include +#ifdef NEARBY_SWIFTPM +#include "internal/platform/logging.h" +#else #include "absl/log/log.h" +#endif #include "absl/strings/string_view.h" #include #include diff --git a/internal/crypto/rsa_private_key.cc b/internal/crypto/rsa_private_key.cc index d1cbe8b8..5bd8a595 100644 --- a/internal/crypto/rsa_private_key.cc +++ b/internal/crypto/rsa_private_key.cc @@ -22,6 +22,8 @@ #ifdef NEARBY_CHROMIUM #include "base/check.h" +#elif defined(NEARBY_SWIFTPM) +#include "internal/platform/logging.h" #else #include "absl/log/check.h" #endif diff --git a/internal/crypto/signature_verifier.cc b/internal/crypto/signature_verifier.cc index b709624d..57e0432a 100644 --- a/internal/crypto/signature_verifier.cc +++ b/internal/crypto/signature_verifier.cc @@ -18,6 +18,8 @@ #ifdef NEARBY_CHROMIUM #include "base/check.h" +#elif defined(NEARBY_SWIFTPM) +#include "internal/platform/logging.h" #else #include "absl/log/check.h" #endif diff --git a/internal/crypto/symmetric_key.cc b/internal/crypto/symmetric_key.cc index 3dc93eef..fa6dcf01 100644 --- a/internal/crypto/symmetric_key.cc +++ b/internal/crypto/symmetric_key.cc @@ -24,6 +24,8 @@ #ifdef NEARBY_CHROMIUM #include "base/check.h" +#elif defined(NEARBY_SWIFTPM) +#include "internal/platform/logging.h" #else #include "absl/log/check.h" #endif diff --git a/internal/platform/ble_connection_info.h b/internal/platform/ble_connection_info.h index 931a78ae..e7e49478 100644 --- a/internal/platform/ble_connection_info.h +++ b/internal/platform/ble_connection_info.h @@ -17,7 +17,11 @@ #include +#ifdef NEARBY_SWIFTPM +#include "internal/platform/logging.h" +#else #include "absl/log/log.h" +#endif #include "absl/strings/string_view.h" #include "internal/platform/byte_array.h" #include "internal/platform/connection_info.h" diff --git a/internal/platform/borrowable.h b/internal/platform/borrowable.h index 1b8bd1e5..9f4b0e91 100644 --- a/internal/platform/borrowable.h +++ b/internal/platform/borrowable.h @@ -39,6 +39,8 @@ #ifdef NEARBY_CHROMIUM #include "base/check.h" +#elif defined(NEARBY_SWIFTPM) +#include "internal/platform/logging.h" #else #include "absl/log/check.h" #endif diff --git a/internal/platform/logging.h b/internal/platform/logging.h index 722c963b..5da04c10 100644 --- a/internal/platform/logging.h +++ b/internal/platform/logging.h @@ -102,4 +102,8 @@ class LogMessageVoidify { NEARBY_LOG_IS_ON(severity) \ ? NEARBY_LOG_MESSAGE(severity)->Print(__VA_ARGS__) : (void)0 +#ifdef NEARBY_SWIFTPM +#define LOG(severity) NEARBY_LOGS(severity) +#endif + #endif // PLATFORM_BASE_LOGGING_H_