-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not all Android versions do now log #66
Comments
Thanks for the library by the way! |
@peterdk maybe... did you try to specify log buffer explicitly? |
When I specify
It immediately starts working again on Android 9. When I dont' specify it, all logs are silent. I would expect that the LogId is set to System by default? |
No, of course not. By default, system defaults are used. I guess that it differs depending on Android version. Prior 0.13, we've used
So, I can conclude that I guess you should be totally OK with |
Ah ok I understand. Just noting that lots of users probably now get their logs not visible by default. Maybe update documentation for this? |
@peterdk could you bisect starting from which Android API version system defaults don't work? Is this API 26 and down and API 27 is OK? |
Ideally, it would be nice to default to @peterdk could you advise something here? Or maybe you can even craft a PR doing that? |
What is your reasoning behind not just setting it to default main? I haven't come across any other logcat log in my day to day Android development? And in case some platform Android Rust code uses this library, they can set it to the preferred stream? As you wrote, normal apps only use Main. I didn't even know there were others. |
rfc @rsglobal |
If that was the case, the Android developers could have not introduce |
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 funcion 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 doesn't 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 <[email protected]>
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 funcion 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 <[email protected]>
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 <[email protected]>
Signed-off-by: Roman Stratiienko <[email protected]> Co-authored-by: Kai Ren <[email protected]>
I upgraded from 0.12.0 to 0.13.0, and while logging still works at API 33, I get with indentical apk, no output in API 26 for example.
I don't know why? Could it be not selecting proper output log buffer? I basically do this:
The text was updated successfully, but these errors were encountered: