Skip to content

Make PlatformLogWriter public and flush on Drop#96

Open
middagj wants to merge 2 commits intorust-mobile:masterfrom
middagj:platform-writer
Open

Make PlatformLogWriter public and flush on Drop#96
middagj wants to merge 2 commits intorust-mobile:masterfrom
middagj:platform-writer

Conversation

@middagj
Copy link
Copy Markdown

@middagj middagj commented Apr 2, 2026

I don't know if it was intentional, but since #85 the PlatformLogWriter is no longer pub. We use it to write via the tracing crate instead of log. This PR makes it public again.

Next to this I added a Drop for PlatformLogWriter. Since it is a buffered writer it is natural to flush on drop.

If you are interested I could also upstream a io::Write implementation that writes bytes and replaces invalid UTF-8 chars with the replacement chars (via utf8_chunks), but that might be counter-intuitive to what people expect from a io::Write implementation.

nl-wallet-bot pushed a commit to MinBZK/nl-wallet that referenced this pull request Apr 7, 2026
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