Skip to content

Commit 062a855

Browse files
QuentinCaldeira-eatonj-ororke
authored andcommittedJul 31, 2024
Missing log function in Zephyr standalone platform (project-chip#34413)
* Add missing log option Signed-off-by: Caldeira, Quentin <QuentinCaldeira@eaton.com> * Add missing logging Kconfig I've created this one with the previous PR, but I didn't see that it was ignored by .gitignore because I named it Kconfig.log, so rename it to Kconfig.logging Always with the purpose to separate each function in a dedicated Kconfig to source in your application, to avoid Kconfig warning, and let your prj.conf be application configuration only Signed-off-by: Caldeira, Quentin <QuentinCaldeira@eaton.com> * Move CHIP_APP_LOG_LEVEL Because every zephyr's user seems to rely on the zephyr logging system, move the log declaration into the zephyr folder Signed-off-by: Caldeira, Quentin <QuentinCaldeira@eaton.com> --------- Signed-off-by: Caldeira, Quentin <QuentinCaldeira@eaton.com>
1 parent bcb89d4 commit 062a855

File tree

5 files changed

+50
-27
lines changed

5 files changed

+50
-27
lines changed
 

‎config/nrfconnect/chip-module/Kconfig

-9
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,6 @@ config CHIP_NRF_PLATFORM
3434
config CHIP_DEVICE_VENDOR_NAME
3535
default "Nordic Semiconductor ASA"
3636

37-
config CHIP_APP_LOG_LEVEL
38-
int "Logging level in application"
39-
default LOG_DEFAULT_LEVEL
40-
depends on LOG
41-
help
42-
Sets the logging level in the Matter application. Use this configuration
43-
option only within the application. To set the logging level for the
44-
Matter stack, use the MATTER_LOG_LEVEL configuration option.
45-
4637
config CHIP_NFC_COMMISSIONING
4738
bool "Share onboarding payload in NFC tag"
4839
default n

‎config/nxp/chip-module/Kconfig

-9
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,6 @@ config CHIP_NXP_PLATFORM
3030
config CHIP_DEVICE_VENDOR_NAME
3131
default "NXP Semiconductors"
3232

33-
config CHIP_APP_LOG_LEVEL
34-
int "Logging level in application"
35-
default LOG_DEFAULT_LEVEL
36-
depends on LOG
37-
help
38-
Sets the logging level in the Matter application. Use this configuration
39-
option only within the application. To set the logging level for the
40-
Matter stack, use the MATTER_LOG_LEVEL configuration option.
41-
4233
config CHIP_EXAMPLE_DEVICE_INFO_PROVIDER
4334
bool "Include default device information provider build"
4435
default y

‎config/telink/chip-module/Kconfig

-9
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,6 @@ if CHIP
2222
config CHIP_DEVICE_VENDOR_NAME
2323
default "Telink Semiconductor"
2424

25-
config CHIP_APP_LOG_LEVEL
26-
int "Logging level in application"
27-
default LOG_DEFAULT_LEVEL
28-
depends on LOG
29-
help
30-
Sets the logging level in the Matter application. Use this configuration
31-
option only within the application. To set the logging level for the
32-
Matter stack, use the MATTER_LOG_LEVEL configuration option.
33-
3425
config CHIP_NFC_COMMISSIONING
3526
bool "Share onboarding payload in NFC tag"
3627
default n

‎config/zephyr/Kconfig

+9
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ menuconfig CHIP
4242

4343
if CHIP
4444

45+
config CHIP_APP_LOG_LEVEL
46+
int "Logging level in application"
47+
default LOG_DEFAULT_LEVEL
48+
depends on LOG
49+
help
50+
Sets the logging level in the Matter application. Use this configuration
51+
option only within the application. To set the logging level for the
52+
Matter stack, use the MATTER_LOG_LEVEL configuration option.
53+
4554
# Device and firmware identifers
4655

4756
config CHIP_DEVICE_VENDOR_ID
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#
2+
# Copyright (c) 2021 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
config LOG
18+
default y
19+
20+
if LOG
21+
22+
choice LOG_MODE
23+
default LOG_MODE_MINIMAL
24+
endchoice
25+
26+
choice MATTER_LOG_LEVEL_CHOICE
27+
default MATTER_LOG_LEVEL_DBG
28+
endchoice
29+
30+
config CHIP_APP_LOG_LEVEL
31+
default 4 # debug
32+
33+
config LOG_DEFAULT_LEVEL
34+
default 1 # error
35+
36+
# disable synchronous printk to avoid blocking IRQs which
37+
# may affect time sensitive components
38+
config PRINTK_SYNC
39+
default n
40+
41+
endif # LOG

0 commit comments

Comments
 (0)