Skip to content

Conversation

@theob-pro
Copy link
Contributor

Last part of the log refactor work.

The common/log has been removed and file that were using it for log has been updated.
More details in the commit message.

Thalley
Thalley previously requested changes Nov 2, 2022
jori-nordic
jori-nordic previously approved these changes Nov 25, 2022
alwa-nordic
alwa-nordic previously approved these changes Nov 25, 2022
jhedberg
jhedberg previously approved these changes Nov 25, 2022
Copy link
Contributor

@tejlmand tejlmand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please cleanup the use of source "${ZEPHYR_BASE}/..."

Rest looks good.

legacy-debug-sym = BT_DEBUG_AICS
module-str = "Audio Input Control Service"
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config_inherit"
source "${ZEPHYR_BASE}/subsys/bluetooth/common/Kconfig.template.log_config_bt"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit, ${ZEPHYR_BASE} can be omitted when using source.

Suggested change
source "${ZEPHYR_BASE}/subsys/bluetooth/common/Kconfig.template.log_config_bt"
source "subsys/bluetooth/common/Kconfig.template.log_config_bt"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should’ve been caught by compliance I think. I will check why it wasn’t.

legacy-debug-sym = BT_DEBUG_AICS_CLIENT
module-str = "Audio Input Control Service client"
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config_inherit"
source "${ZEPHYR_BASE}/subsys/bluetooth/common/Kconfig.template.log_config_bt"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
source "${ZEPHYR_BASE}/subsys/bluetooth/common/Kconfig.template.log_config_bt"
source "subsys/bluetooth/common/Kconfig.template.log_config_bt"

legacy-debug-sym = BT_AUDIO_DEBUG_STREAM
module-str = "Bluetooth Audio Stream"
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config_inherit"
source "${ZEPHYR_BASE}/subsys/bluetooth/common/Kconfig.template.log_config_bt"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
source "${ZEPHYR_BASE}/subsys/bluetooth/common/Kconfig.template.log_config_bt"
source "subsys/bluetooth/common/Kconfig.template.log_config_bt"

legacy-debug-sym = BT_DEBUG_ASCS
module-str = "Audio Stream Control Service"
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config_inherit"
source "${ZEPHYR_BASE}/subsys/bluetooth/common/Kconfig.template.log_config_bt"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
source "${ZEPHYR_BASE}/subsys/bluetooth/common/Kconfig.template.log_config_bt"
source "subsys/bluetooth/common/Kconfig.template.log_config_bt"

legacy-debug-sym = BT_AUDIO_DEBUG_UNICAST_SERVER
module-str = "Bluetooth Audio Unicast Server"
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config_inherit"
source "${ZEPHYR_BASE}/subsys/bluetooth/common/Kconfig.template.log_config_bt"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
source "${ZEPHYR_BASE}/subsys/bluetooth/common/Kconfig.template.log_config_bt"
source "subsys/bluetooth/common/Kconfig.template.log_config_bt"

legacy-debug-sym = BT_DEBUG_CSIP_SET_MEMBER_CRYPTO
module-str = "Coordinated Set Identification Profile crypto functions"
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config_inherit"
source "${ZEPHYR_BASE}/subsys/bluetooth/common/Kconfig.template.log_config_bt"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
source "${ZEPHYR_BASE}/subsys/bluetooth/common/Kconfig.template.log_config_bt"
source "subsys/bluetooth/common/Kconfig.template.log_config_bt"

legacy-debug-sym = BT_DEBUG_HAS
module-str = "Hearing Access Service"
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config_inherit"
source "${ZEPHYR_BASE}/subsys/bluetooth/common/Kconfig.template.log_config_bt"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
source "${ZEPHYR_BASE}/subsys/bluetooth/common/Kconfig.template.log_config_bt"
source "subsys/bluetooth/common/Kconfig.template.log_config_bt"

legacy-debug-sym = BT_DEBUG_HAS_CLIENT
module-str = "Hearing Access Service Client"
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config_inherit"
source "${ZEPHYR_BASE}/subsys/bluetooth/common/Kconfig.template.log_config_bt"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
source "${ZEPHYR_BASE}/subsys/bluetooth/common/Kconfig.template.log_config_bt"
source "subsys/bluetooth/common/Kconfig.template.log_config_bt"

legacy-debug-sym = BT_DEBUG_MCS
module-str = "Media Control Service"
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config_inherit"
source "${ZEPHYR_BASE}/subsys/bluetooth/common/Kconfig.template.log_config_bt"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
source "${ZEPHYR_BASE}/subsys/bluetooth/common/Kconfig.template.log_config_bt"
source "subsys/bluetooth/common/Kconfig.template.log_config_bt"

legacy-debug-sym = BT_DEBUG_MCC
module-str = "Media Control Client"
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config_inherit"
source "${ZEPHYR_BASE}/subsys/bluetooth/common/Kconfig.template.log_config_bt"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
source "${ZEPHYR_BASE}/subsys/bluetooth/common/Kconfig.template.log_config_bt"
source "subsys/bluetooth/common/Kconfig.template.log_config_bt"

@theob-pro theob-pro dismissed stale reviews from jhedberg, alwa-nordic, and jori-nordic via 8aad629 November 25, 2022 11:59
carlescufi
carlescufi previously approved these changes Nov 25, 2022
@tejlmand
Copy link
Contributor

@theob-pro thanks for fixing, but please squash the fix with previous commit, there is no reason to have that particular review comment fix as a independent commit.

jhedberg
jhedberg previously approved these changes Nov 25, 2022
…n/log`

The `bluetooth/common/log.h` and `bluetooth/common/log.c` files have been
removed. Files that were using them have been updated to use
`zephyr/logging/log.h` instead.

Those replacement have been done consequently:
- `/BT_DBG/LOG_DBG/`
- `/BT_ERR/LOG_ERR/`
- `/BT_WARN/LOG_WRN/`
- `/BT_INFO/LOG_INF/`
- `/BT_HEXDUMP_DBG/LOG_HEXDUMP_DBG/`
- `/BT_DBG_OBJ_ID/LOG_DBG_OBJ_ID/`

Also, some files were relying on the `common/log.h` include to include
`zephyr/bluetooth/hci.h`, in those cases the include of `hci.h` has
been added.

For files that were including `common/log.h` but not using any logs,
the include has been removed and not replaced.

Signed-off-by: Théo Battrel <[email protected]>
@theob-pro theob-pro dismissed stale reviews from jhedberg and carlescufi via 8390c60 November 25, 2022 13:00
Copy link
Contributor

@tejlmand tejlmand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.