From b1bfe6df039c59c72cff16a21e2c9d5c7a2acd55 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 30 Oct 2024 10:54:25 -0400 Subject: [PATCH] Switch all backends for log and assert to the new chip backends instead of previous built-in/basic ones. Remove old log backend --- .../bouffalolab/common/lib/pw_rpc/pw_rpc.gni | 4 +- config/efr32/lib/pw_rpc/pw_rpc.gni | 4 +- config/mbed/chip-gn/lib/pw_rpc/pw_rpc.gni | 4 +- config/nxp/lib/pw_rpc/pw_rpc.gni | 4 +- config/qpg/lib/pw_rpc/pw_rpc.gni | 4 +- .../all-clusters-app/linux/with_pw_rpc.gni | 4 +- examples/android/CHIPTest/args.gni | 4 +- examples/chef/linux/with_pw_rpc.gni | 4 +- examples/fabric-admin/with_pw_rpc.gni | 4 +- .../fabric-bridge-app/linux/with_pw_rpc.gni | 4 +- examples/light-switch-app/genio/args.gni | 4 +- .../genio/build_for_wifi_args.gni | 4 +- examples/light-switch-app/qpg/args.gni | 4 +- .../linux/with_pw_rpc.gni | 4 +- .../lighting-app/bouffalolab/bl602/args.gni | 4 +- .../lighting-app/bouffalolab/bl702/args.gni | 4 +- .../lighting-app/bouffalolab/bl702l/args.gni | 4 +- examples/lighting-app/genio/args.gni | 4 +- .../genio/build_for_wifi_args.gni | 4 +- examples/lighting-app/linux/with_pw_rpc.gni | 4 +- examples/lighting-app/qpg/args.gni | 4 +- examples/lock-app/genio/args.gni | 4 +- .../lock-app/genio/build_for_wifi_args.gni | 4 +- examples/lock-app/qpg/args.gni | 4 +- examples/ota-requestor-app/genio/args.gni | 4 +- .../genio/build_for_wifi_args.gni | 4 +- examples/shell/genio/args.gni | 4 +- examples/shell/qpg/args.gni | 4 +- examples/thermostat/genio/args.gni | 4 +- .../thermostat/genio/build_for_wifi_args.gni | 4 +- examples/thermostat/qpg/args.gni | 4 +- src/app/tests/BUILD.gn | 2 - src/lib/support/pw_log_chip/BUILD.gn | 35 ------------- .../pw_log_chip/public/pw_log_chip/log_chip.h | 50 ------------------- .../pw_log_backend/log_backend.h | 24 --------- src/test_driver/efr32/args.gni | 4 +- 36 files changed, 64 insertions(+), 175 deletions(-) delete mode 100644 src/lib/support/pw_log_chip/BUILD.gn delete mode 100644 src/lib/support/pw_log_chip/public/pw_log_chip/log_chip.h delete mode 100644 src/lib/support/pw_log_chip/public_overrides/pw_log_backend/log_backend.h diff --git a/config/bouffalolab/common/lib/pw_rpc/pw_rpc.gni b/config/bouffalolab/common/lib/pw_rpc/pw_rpc.gni index 2cfbc034e875eb..7efdd73772f786 100644 --- a/config/bouffalolab/common/lib/pw_rpc/pw_rpc.gni +++ b/config/bouffalolab/common/lib/pw_rpc/pw_rpc.gni @@ -15,8 +15,8 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_sys_io_BACKEND = "${chip_root}/examples/platform/bouffalolab/common/rpc/pw_sys_io:pw_sys_io" diff --git a/config/efr32/lib/pw_rpc/pw_rpc.gni b/config/efr32/lib/pw_rpc/pw_rpc.gni index 101112c12dadc9..be80db059b3507 100644 --- a/config/efr32/lib/pw_rpc/pw_rpc.gni +++ b/config/efr32/lib/pw_rpc/pw_rpc.gni @@ -15,8 +15,8 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" pw_sys_io_BACKEND = "${chip_root}/examples/platform/silabs/pw_sys_io:pw_sys_io_silabs" diff --git a/config/mbed/chip-gn/lib/pw_rpc/pw_rpc.gni b/config/mbed/chip-gn/lib/pw_rpc/pw_rpc.gni index 2b03f6b4c9958c..98b7674970ee53 100644 --- a/config/mbed/chip-gn/lib/pw_rpc/pw_rpc.gni +++ b/config/mbed/chip-gn/lib/pw_rpc/pw_rpc.gni @@ -15,8 +15,8 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_sys_io_BACKEND = "${chip_root}/examples/platform/mbed/pw_sys_io:pw_sys_io_mbed" pw_rpc_system_server_BACKEND = diff --git a/config/nxp/lib/pw_rpc/pw_rpc.gni b/config/nxp/lib/pw_rpc/pw_rpc.gni index 68255db8bb96da..bb29126216b94e 100644 --- a/config/nxp/lib/pw_rpc/pw_rpc.gni +++ b/config/nxp/lib/pw_rpc/pw_rpc.gni @@ -15,8 +15,8 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" pw_sys_io_BACKEND = "${chip_root}/examples/platform/nxp/pw_sys_io:pw_sys_io_nxp" diff --git a/config/qpg/lib/pw_rpc/pw_rpc.gni b/config/qpg/lib/pw_rpc/pw_rpc.gni index 60fb93e6b8fc44..b4757e6ae6e01f 100644 --- a/config/qpg/lib/pw_rpc/pw_rpc.gni +++ b/config/qpg/lib/pw_rpc/pw_rpc.gni @@ -15,8 +15,8 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_sys_io_BACKEND = "${chip_root}/examples/platform/qpg/pw_sys_io:pw_sys_io_qpg" pw_build_LINK_DEPS = [ diff --git a/examples/all-clusters-app/linux/with_pw_rpc.gni b/examples/all-clusters-app/linux/with_pw_rpc.gni index 0f1ab1ea89c121..02b81fed845458 100644 --- a/examples/all-clusters-app/linux/with_pw_rpc.gni +++ b/examples/all-clusters-app/linux/with_pw_rpc.gni @@ -21,8 +21,8 @@ import("${chip_root}/config/standalone/args.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" pw_trace_BACKEND = "$dir_pw_trace_tokenized" pw_unit_test_MAIN = "$dir_pw_unit_test:logging_main" diff --git a/examples/android/CHIPTest/args.gni b/examples/android/CHIPTest/args.gni index df7c34af9c20ae..d11b391cd59561 100644 --- a/examples/android/CHIPTest/args.gni +++ b/examples/android/CHIPTest/args.gni @@ -28,8 +28,8 @@ chip_monolithic_tests = false pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" -pw_assert_BACKEND = "$dir_pw_assert_log" -pw_log_BACKEND = "$dir_pw_log_basic" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" +pw_log_BACKEND = "${chip_root}/src/backends/log" pw_unit_test_BACKEND = "$dir_pw_unit_test:light" diff --git a/examples/chef/linux/with_pw_rpc.gni b/examples/chef/linux/with_pw_rpc.gni index 0f1ab1ea89c121..02b81fed845458 100644 --- a/examples/chef/linux/with_pw_rpc.gni +++ b/examples/chef/linux/with_pw_rpc.gni @@ -21,8 +21,8 @@ import("${chip_root}/config/standalone/args.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" pw_trace_BACKEND = "$dir_pw_trace_tokenized" pw_unit_test_MAIN = "$dir_pw_unit_test:logging_main" diff --git a/examples/fabric-admin/with_pw_rpc.gni b/examples/fabric-admin/with_pw_rpc.gni index abb9ac65f27e78..e6525c71e7b492 100644 --- a/examples/fabric-admin/with_pw_rpc.gni +++ b/examples/fabric-admin/with_pw_rpc.gni @@ -21,8 +21,8 @@ import("${chip_root}/config/standalone/args.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" pw_trace_BACKEND = "$dir_pw_trace_tokenized" pw_unit_test_MAIN = "$dir_pw_unit_test:logging_main" diff --git a/examples/fabric-bridge-app/linux/with_pw_rpc.gni b/examples/fabric-bridge-app/linux/with_pw_rpc.gni index e1bd567cf22db2..d680d838e1010f 100644 --- a/examples/fabric-bridge-app/linux/with_pw_rpc.gni +++ b/examples/fabric-bridge-app/linux/with_pw_rpc.gni @@ -21,8 +21,8 @@ import("${chip_root}/config/standalone/args.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" pw_trace_BACKEND = "$dir_pw_trace_tokenized" pw_unit_test_MAIN = "$dir_pw_unit_test:logging_main" diff --git a/examples/light-switch-app/genio/args.gni b/examples/light-switch-app/genio/args.gni index ddbfb9fa47f20d..0bf08059fdf649 100644 --- a/examples/light-switch-app/genio/args.gni +++ b/examples/light-switch-app/genio/args.gni @@ -18,8 +18,8 @@ import("${chip_root}/src/platform/mt793x/args.gni") mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" chip_enable_ble = true diff --git a/examples/light-switch-app/genio/build_for_wifi_args.gni b/examples/light-switch-app/genio/build_for_wifi_args.gni index cb0ea7600a2dd5..7ea45da9f2e2bb 100644 --- a/examples/light-switch-app/genio/build_for_wifi_args.gni +++ b/examples/light-switch-app/genio/build_for_wifi_args.gni @@ -18,5 +18,5 @@ mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_openthread = false import("${chip_root}/src/platform/MT793X/wifi_args.gni") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" diff --git a/examples/light-switch-app/qpg/args.gni b/examples/light-switch-app/qpg/args.gni index 9a69cd16959f6d..b8c79577e7e1e3 100644 --- a/examples/light-switch-app/qpg/args.gni +++ b/examples/light-switch-app/qpg/args.gni @@ -32,5 +32,5 @@ chip_stack_lock_tracking = "none" matter_device_vid = "0xFFF1" matter_device_pid = "0x8004" -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" diff --git a/examples/lighting-app-data-mode-no-unique-id/linux/with_pw_rpc.gni b/examples/lighting-app-data-mode-no-unique-id/linux/with_pw_rpc.gni index 0f1ab1ea89c121..02b81fed845458 100644 --- a/examples/lighting-app-data-mode-no-unique-id/linux/with_pw_rpc.gni +++ b/examples/lighting-app-data-mode-no-unique-id/linux/with_pw_rpc.gni @@ -21,8 +21,8 @@ import("${chip_root}/config/standalone/args.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" pw_trace_BACKEND = "$dir_pw_trace_tokenized" pw_unit_test_MAIN = "$dir_pw_unit_test:logging_main" diff --git a/examples/lighting-app/bouffalolab/bl602/args.gni b/examples/lighting-app/bouffalolab/bl602/args.gni index 0fcb5aac2edc9b..470bce11160017 100644 --- a/examples/lighting-app/bouffalolab/bl602/args.gni +++ b/examples/lighting-app/bouffalolab/bl602/args.gni @@ -19,8 +19,8 @@ import("${chip_root}/src/platform/bouffalolab/BL602/args.gni") bl_iot_sdk_target = get_label_info(":sdk", "label_no_toolchain") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" chip_detail_logging = false diff --git a/examples/lighting-app/bouffalolab/bl702/args.gni b/examples/lighting-app/bouffalolab/bl702/args.gni index e06c706903b935..08612ba63362ec 100644 --- a/examples/lighting-app/bouffalolab/bl702/args.gni +++ b/examples/lighting-app/bouffalolab/bl702/args.gni @@ -19,8 +19,8 @@ import("${chip_root}/src/platform/bouffalolab/BL702/args.gni") bl_iot_sdk_target = get_label_info(":sdk", "label_no_toolchain") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" chip_detail_logging = false diff --git a/examples/lighting-app/bouffalolab/bl702l/args.gni b/examples/lighting-app/bouffalolab/bl702l/args.gni index 3120af1cce60f6..63fdf6b241b068 100644 --- a/examples/lighting-app/bouffalolab/bl702l/args.gni +++ b/examples/lighting-app/bouffalolab/bl702l/args.gni @@ -19,8 +19,8 @@ import("${chip_root}/src/platform/bouffalolab/BL702L/args.gni") bl_iot_sdk_target = get_label_info(":sdk", "label_no_toolchain") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" chip_detail_logging = false diff --git a/examples/lighting-app/genio/args.gni b/examples/lighting-app/genio/args.gni index e22869653722a7..1de2a080aca8a5 100644 --- a/examples/lighting-app/genio/args.gni +++ b/examples/lighting-app/genio/args.gni @@ -19,8 +19,8 @@ import("${chip_root}/src/platform/mt793x/args.gni") mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" chip_enable_ble = true diff --git a/examples/lighting-app/genio/build_for_wifi_args.gni b/examples/lighting-app/genio/build_for_wifi_args.gni index cb0ea7600a2dd5..7ea45da9f2e2bb 100644 --- a/examples/lighting-app/genio/build_for_wifi_args.gni +++ b/examples/lighting-app/genio/build_for_wifi_args.gni @@ -18,5 +18,5 @@ mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_openthread = false import("${chip_root}/src/platform/MT793X/wifi_args.gni") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" diff --git a/examples/lighting-app/linux/with_pw_rpc.gni b/examples/lighting-app/linux/with_pw_rpc.gni index 0f1ab1ea89c121..02b81fed845458 100644 --- a/examples/lighting-app/linux/with_pw_rpc.gni +++ b/examples/lighting-app/linux/with_pw_rpc.gni @@ -21,8 +21,8 @@ import("${chip_root}/config/standalone/args.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" pw_trace_BACKEND = "$dir_pw_trace_tokenized" pw_unit_test_MAIN = "$dir_pw_unit_test:logging_main" diff --git a/examples/lighting-app/qpg/args.gni b/examples/lighting-app/qpg/args.gni index ea22dfd187fbb2..373429464dc3ff 100644 --- a/examples/lighting-app/qpg/args.gni +++ b/examples/lighting-app/qpg/args.gni @@ -30,5 +30,5 @@ chip_stack_lock_tracking = "none" matter_device_vid = "0xFFF1" matter_device_pid = "0x8005" -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" diff --git a/examples/lock-app/genio/args.gni b/examples/lock-app/genio/args.gni index ddbfb9fa47f20d..0bf08059fdf649 100644 --- a/examples/lock-app/genio/args.gni +++ b/examples/lock-app/genio/args.gni @@ -18,8 +18,8 @@ import("${chip_root}/src/platform/mt793x/args.gni") mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" chip_enable_ble = true diff --git a/examples/lock-app/genio/build_for_wifi_args.gni b/examples/lock-app/genio/build_for_wifi_args.gni index cb0ea7600a2dd5..7ea45da9f2e2bb 100644 --- a/examples/lock-app/genio/build_for_wifi_args.gni +++ b/examples/lock-app/genio/build_for_wifi_args.gni @@ -18,5 +18,5 @@ mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_openthread = false import("${chip_root}/src/platform/MT793X/wifi_args.gni") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" diff --git a/examples/lock-app/qpg/args.gni b/examples/lock-app/qpg/args.gni index d5dcdfe217c635..c0b0d9e11a0d8f 100644 --- a/examples/lock-app/qpg/args.gni +++ b/examples/lock-app/qpg/args.gni @@ -31,5 +31,5 @@ chip_stack_lock_tracking = "none" matter_device_vid = "0xFFF1" matter_device_pid = "0x8006" -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" diff --git a/examples/ota-requestor-app/genio/args.gni b/examples/ota-requestor-app/genio/args.gni index 7a6cc1c74c6394..c7521664841c23 100644 --- a/examples/ota-requestor-app/genio/args.gni +++ b/examples/ota-requestor-app/genio/args.gni @@ -18,8 +18,8 @@ import("${chip_root}/src/platform/mt793x/args.gni") mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" chip_enable_ble = true diff --git a/examples/ota-requestor-app/genio/build_for_wifi_args.gni b/examples/ota-requestor-app/genio/build_for_wifi_args.gni index cb0ea7600a2dd5..7ea45da9f2e2bb 100644 --- a/examples/ota-requestor-app/genio/build_for_wifi_args.gni +++ b/examples/ota-requestor-app/genio/build_for_wifi_args.gni @@ -18,5 +18,5 @@ mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_openthread = false import("${chip_root}/src/platform/MT793X/wifi_args.gni") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" diff --git a/examples/shell/genio/args.gni b/examples/shell/genio/args.gni index 8d2c11daa5b180..5099f70ee68ace 100644 --- a/examples/shell/genio/args.gni +++ b/examples/shell/genio/args.gni @@ -19,8 +19,8 @@ import("${chip_root}/src/platform/mt793x/args.gni") mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" chip_enable_ble = false chip_config_network_layer_ble = false diff --git a/examples/shell/qpg/args.gni b/examples/shell/qpg/args.gni index 478e91d9cb05a6..c5b5a8241f09d8 100644 --- a/examples/shell/qpg/args.gni +++ b/examples/shell/qpg/args.gni @@ -19,8 +19,8 @@ import("${chip_root}/examples/platform/qpg/args.gni") qpg_sdk_target = get_label_info(":sdk", "label_no_toolchain") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" chip_build_libshell = true # Disable lock tracking, since our FreeRTOS configuration does not set diff --git a/examples/thermostat/genio/args.gni b/examples/thermostat/genio/args.gni index ddbfb9fa47f20d..0bf08059fdf649 100644 --- a/examples/thermostat/genio/args.gni +++ b/examples/thermostat/genio/args.gni @@ -18,8 +18,8 @@ import("${chip_root}/src/platform/mt793x/args.gni") mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" chip_enable_ble = true diff --git a/examples/thermostat/genio/build_for_wifi_args.gni b/examples/thermostat/genio/build_for_wifi_args.gni index cb0ea7600a2dd5..7ea45da9f2e2bb 100644 --- a/examples/thermostat/genio/build_for_wifi_args.gni +++ b/examples/thermostat/genio/build_for_wifi_args.gni @@ -18,5 +18,5 @@ mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_openthread = false import("${chip_root}/src/platform/MT793X/wifi_args.gni") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" diff --git a/examples/thermostat/qpg/args.gni b/examples/thermostat/qpg/args.gni index 693375e4388593..9911b1a9b2bb6f 100644 --- a/examples/thermostat/qpg/args.gni +++ b/examples/thermostat/qpg/args.gni @@ -31,5 +31,5 @@ chip_stack_lock_tracking = "none" matter_device_vid = "0xFFF1" matter_device_pid = "0x8003" -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index 9ebed234e5b45e..5e9c0005c35f8a 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -181,8 +181,6 @@ source_set("app-test-stubs") { "test-interaction-model-api.h", ] - public_configs = [ "${chip_root}/src/lib/support/pw_log_chip:config" ] - public_deps = [ "${chip_root}/src/app/util/mock:mock_codegen_data_model", "${chip_root}/src/app/util/mock:mock_ember", diff --git a/src/lib/support/pw_log_chip/BUILD.gn b/src/lib/support/pw_log_chip/BUILD.gn deleted file mode 100644 index 23695fa505add0..00000000000000 --- a/src/lib/support/pw_log_chip/BUILD.gn +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2020 The Pigweed Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -import("//build_overrides/chip.gni") -import("//build_overrides/pigweed.gni") - -import("$dir_pw_build/target_types.gni") - -config("config") { - include_dirs = [ - "public", - "public_overrides", - ] -} - -pw_source_set("pw_log_chip") { - public_configs = [ ":config" ] - public_deps = [ ":pw_log_chip.impl" ] - public = [ "public_overrides/pw_log_backend/log_backend.h" ] - sources = [ "public/pw_log_chip/log_chip.h" ] -} - -pw_source_set("pw_log_chip.impl") { - public_deps = [ "${chip_root}/src/lib/support" ] -} diff --git a/src/lib/support/pw_log_chip/public/pw_log_chip/log_chip.h b/src/lib/support/pw_log_chip/public/pw_log_chip/log_chip.h deleted file mode 100644 index 6550ec707057da..00000000000000 --- a/src/lib/support/pw_log_chip/public/pw_log_chip/log_chip.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2020 Project CHIP Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * This header redirects Pigweed logging prints to chip. - */ -#pragma once - -#include - -#include "pw_preprocessor/arguments.h" - -/** - * Redirect pigweed log prints to chip logging. - * Currently does not use a log module, but this could be added when needed. - * pigweed debug and info level logs are mapped to chip's kLogCategory_Detail. - * All other log levels are mapped to chip's kLogCategory_Error. - * - * Note: This function should not be called directly, instead call the functions - * in pw_log/log.h. - * - * @param[in] level Pigweed log level. - * @param[in] flags Pigweed logging flags, currently these are ignored. - * @param[in] message The printf style log string. - */ -#define PW_LOG(level, flags, message, ...) \ - do \ - { \ - if (level >= PW_LOG_LEVEL_INFO) \ - { \ - ::chip::Logging::Log(::chip::Logging::kLogModule_NotSpecified, \ - (level <= PW_LOG_LEVEL_INFO) ? ::chip::Logging::kLogCategory_Detail \ - : ::chip::Logging::kLogCategory_Error, \ - message PW_COMMA_ARGS(__VA_ARGS__)); \ - } \ - } while (0) diff --git a/src/lib/support/pw_log_chip/public_overrides/pw_log_backend/log_backend.h b/src/lib/support/pw_log_chip/public_overrides/pw_log_backend/log_backend.h deleted file mode 100644 index aee9d4abff0403..00000000000000 --- a/src/lib/support/pw_log_chip/public_overrides/pw_log_backend/log_backend.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2020 Project CHIP Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * This header interfaces with the Pigweed logging facade by overriding - * the backend header. - */ -#pragma once - -#include "pw_log_chip/log_chip.h" diff --git a/src/test_driver/efr32/args.gni b/src/test_driver/efr32/args.gni index 35be5dd63e3870..4620b53638cb90 100644 --- a/src/test_driver/efr32/args.gni +++ b/src/test_driver/efr32/args.gni @@ -30,8 +30,8 @@ openthread_external_platform = pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" -pw_assert_BACKEND = "$dir_pw_assert_log" -pw_log_BACKEND = "$dir_pw_log_basic" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" +pw_log_BACKEND = "${chip_root}/src/backends/log" pw_unit_test_BACKEND = "$dir_pw_unit_test:light"