Skip to content

Commit 676353c

Browse files
Pull in android logging in the standard way
1 parent 8369c1e commit 676353c

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/lib/support/BUILD.gn

+3-5
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,9 @@ static_library("support") {
301301
"${chip_root}/src/inet:inet_config_header",
302302
]
303303

304-
# Android has no 'platform' that provides logging
305-
if (current_os == "android") {
306-
public_deps += [ "${chip_root}/src/platform/android:logging" ]
307-
}
308-
304+
# Platforms that utilize CHIP_SYSTEM_CONFIG_PLATFORM_LOG need to
305+
# be pulled in here as public_deps since they hook into logging at
306+
# the macro level rather than just providing a LogV implementation.
309307
if (current_os == "mac" || current_os == "ios") {
310308
public_deps += [ "${chip_root}/src/platform/Darwin:logging" ]
311309
}

src/platform/logging/BUILD.gn

+4-3
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,11 @@ source_set("default") {
7676
deps += [ ":stdio" ]
7777
} else if (chip_device_platform == "nuttx") {
7878
deps += [ "${chip_root}/src/platform/NuttX:logging" ]
79+
} else if (chip_device_platform == "android") {
80+
deps += [ "${chip_root}/src/platform/android:logging" ]
7981
} else {
80-
assert(
81-
chip_device_platform == "fake" || chip_device_platform == "android" ||
82-
chip_device_platform == "external" || chip_device_platform == "none")
82+
assert(chip_device_platform == "fake" ||
83+
chip_device_platform == "external" || chip_device_platform == "none")
8384
}
8485
}
8586
}

0 commit comments

Comments
 (0)