mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
Enable Nearby logger writer for iOS
PiperOrigin-RevId: 764442996
This commit is contained in:
committed by
Copybara-Service
parent
132d04348d
commit
5e37ee44f4
+6
-1
@@ -52,7 +52,12 @@ cc_library(
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/types:span",
|
||||
],
|
||||
] + select({
|
||||
"@platforms//os:platform_ios": [
|
||||
"//internal/platform/implementation/apple:logger_writer",
|
||||
],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
)
|
||||
|
||||
# iOS only.
|
||||
|
||||
@@ -49,6 +49,9 @@
|
||||
#include "internal/platform/byte_array.h"
|
||||
#include "internal/platform/file.h"
|
||||
#include "internal/platform/logging.h"
|
||||
#if TARGET_OS_IOS
|
||||
#include "internal/platform/implementation/apple/nearby_logger_writer.h"
|
||||
#endif // TARGET_OS_IOS
|
||||
|
||||
namespace nearby::connections {
|
||||
class Core;
|
||||
@@ -221,6 +224,12 @@ NcContext* GetContext(NC_INSTANCE instance) {
|
||||
|
||||
NC_INSTANCE NcCreateService() {
|
||||
NcContext nc_context;
|
||||
#if TARGET_OS_IOS
|
||||
#if DEBUG
|
||||
absl::SetGlobalVLogLevel(1);
|
||||
#endif // DEBUG
|
||||
::nearby::apple::EnableNearbyLoggerWriter();
|
||||
#endif // TARGET_OS_IOS
|
||||
|
||||
#if defined(NC_IOS_SDK)
|
||||
nearby::NearbyFlags::GetInstance().OverrideBoolFlagValue(
|
||||
|
||||
Reference in New Issue
Block a user