Skip to content

Conversation

@quic-vkatoch
Copy link
Contributor

Initialize and deinitialize fastrpc_log during domain lifecycle instead of global init/deinit.

Refactor HAP_debug_runtime for clarity and efficiency by adding early return when no logging is required, consolidating buffer allocation and message formatting, validating length, and ensuring deterministic cleanup. The changes also streamline logging logic by handling persist buffer for critical logs, enabling file logging only when configured, and invoking HAP_debug based on log mask, while reducing unnecessary heap allocations and improving control flow.

Initialize and deinitialize fastrpc_log during domain lifecycle
instead of global init/deinit.

Refactor HAP_debug_runtime for clarity and efficiency by adding
early return when no logging is required, consolidating buffer
allocation and message formatting, validating length, and
ensuring deterministic cleanup. The changes also streamline
logging logic by handling persist buffer for critical logs,
enabling file logging only when configured, and invoking
HAP_debug based on log mask, while reducing unnecessary heap
allocations and improving control flow.

Signed-off-by: Vinayak Katoch <[email protected]>
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.

1 participant