Fix buf_id issues with older SDK API version - #67
Merged
Conversation
As per user report at least SDKv26 does not resolve LOG_ID_DEFAULT to LOG_ID_MAIN internally, which forces users to set LOG_ID_MAIN explicitly. Rework android_log function to accept optional buf_id and use __android_log_write FFI function if no buf_id specified. This will return previous behavior for users that do not need to override buf_id. Closes: https://github.com/Nercury/android_logger-rs/issues/66 Fixes: fee1bea ("Support selecting target buffer of Android logging system") Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As per user report at least SDKv26 does not resolve LOG_ID_DEFAULT to LOG_ID_MAIN internally, which forces users to set LOG_ID_MAIN explicitly.
Rework android_log function to accept optional buf_id and use __android_log_write FFI function if no buf_id specified. This will return previous behavior for users that do not need to override buf_id.
Closes: https://github.com/Nercury/android_logger-rs/issues/66
Fixes: fee1bea ("Support selecting target buffer of Android logging system")