Skip to content

Fix buf_id issues with older SDK API version - #67

Merged
tyranron merged 2 commits into
rust-mobile:masterfrom
rsglobal:fix-no-bufid
Mar 7, 2023
Merged

Fix buf_id issues with older SDK API version#67
tyranron merged 2 commits into
rust-mobile:masterfrom
rsglobal:fix-no-bufid

Conversation

@rsglobal

@rsglobal rsglobal commented Mar 3, 2023

Copy link
Copy Markdown
Contributor

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")

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>
@tyranron tyranron added enhancement Improvement of existing features or bugfix semver::fix Patch fix in terms of SemVer k::ux UX (user experience) releated labels Mar 7, 2023
@tyranron tyranron added this to the 0.13.1 milestone Mar 7, 2023

@tyranron tyranron left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@rsglobal thank you for quick response!

@tyranron
tyranron merged commit e97bc53 into rust-mobile:master Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement of existing features or bugfix k::ux UX (user experience) releated semver::fix Patch fix in terms of SemVer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not all Android versions do now log

2 participants