Skip to content

ar_osal: Add Zephyr logging support with Kconfig integration#55

Open
quic-aditrath wants to merge 1 commit intoAudioReach:masterfrom
quic-aditrath:zephyr_logging
Open

ar_osal: Add Zephyr logging support with Kconfig integration#55
quic-aditrath wants to merge 1 commit intoAudioReach:masterfrom
quic-aditrath:zephyr_logging

Conversation

@quic-aditrath
Copy link
Contributor

Add conditional compilation to support Zephyr's native logging system alongside the existing Android/Linux implementation.

The Zephyr implementation leverages the native logging subsystem for automatic timestamp generation, module prefixing, and output routing, with compile-time log level configuration through Kconfig symbol CONFIG_ARE_LOG_LEVEL.

Add conditional compilation to support Zephyr's native logging system
alongside the existing Android/Linux implementation.

The Zephyr implementation leverages the native logging subsystem for
automatic timestamp generation, module prefixing, and output routing,
with compile-time log level configuration through Kconfig symbol
CONFIG_ARE_LOG_LEVEL.

Signed-off-by: Aditya Rathi <aditrath@qti.qualcomm.com>
@quic-aditrath quic-aditrath requested review from a team February 5, 2026 03:20
_IRQL_requires_max_(DISPATCH_LEVEL)
void ar_log_init(void)
{
#ifdef __ZEPHYR__
Copy link
Contributor

Choose a reason for hiding this comment

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

should we have #ifndef to avoid empty line?


#ifdef __ZEPHYR__
/* Use Zephyr logging macros */
if (level == AR_DEBUG) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like we can unify e.g instead of calling __android_log_write, call generic MACRO (LOG_DBG) instead. Then, map LOG_DBG to __android_log_write

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants