Skip to content

Support selecting target buffer - #50

Closed
randomPoison wants to merge 1 commit into
rust-mobile:masterfrom
randomPoison:aosp-patches
Closed

Support selecting target buffer#50
randomPoison wants to merge 1 commit into
rust-mobile:masterfrom
randomPoison:aosp-patches

Conversation

@randomPoison

@randomPoison randomPoison commented Apr 26, 2022

Copy link
Copy Markdown
Contributor

Implementation for #49.

  • Add LogId enum to identify the different log buffers.
  • Add an argument to PlatformLogWriter::new to allow a target buffer to be specified.
  • Update Config to allow specifying a target buffer.

This change, as it exists currently, is a breaking change for any users who are currently calling PlatformLogWriter::new directly. It should not break any users who are using Config with init_once. If this is undesirable then I'm open to updating the PR to avoid breaking changes.

Note also that these changes depend on an update to android_log-sys in order to expose __android_log_buf_write. See Nercury/android_log-sys-rs#4.

* Add `LogId` enum to identify the different log buffers.
* Add an argument to `PlatformLogWriter::new` to allow a target buffer to be specified.
* Update `Config` to allow specifying a target buffer.
@Nercury

Nercury commented Dec 17, 2022

Copy link
Copy Markdown
Collaborator

@randomPoison I have merged other PRs that are simpler, so this one that gets the conflicts. Let me know if you are still interested in getting this merged.

@rsglobal

Copy link
Copy Markdown
Contributor

Hello,

Can we get this PR merged?
I need it for mm-radio project which should use radio buffer.

@Nercury

Nercury commented Feb 13, 2023

Copy link
Copy Markdown
Collaborator

@rsglobal Hi, not until the conflicts are resolved.

@rsglobal

Copy link
Copy Markdown
Contributor

@Nercury , rebased, see #64

@tyranron tyranron added wontfix k::api Related to API (application interface) feature New feature or request semver::breaking Breaking change in terms of SemVer labels Feb 14, 2023
@tyranron

Copy link
Copy Markdown
Contributor

Superseded by #64

@tyranron tyranron closed this Feb 14, 2023
tyranron added a commit that referenced this pull request Feb 14, 2023
- add `LogId` enum to identify the different log buffers
- add `buf_id` argument to `PlatformLogWriter::new()`
- add `Config::with_log_buffer()` allowing to specify target buffer

Co-authored-by: David LeGare <dlegare.1001@gmail.com>
Co-authored-by: Kai Ren <tyranron@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate feature New feature or request k::api Related to API (application interface) semver::breaking Breaking change in terms of SemVer wontfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants