Skip to content
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

Chunked log writer that breaks up long messages #396

Merged
merged 2 commits into from
Jun 10, 2024

Conversation

psh
Copy link
Contributor

@psh psh commented May 7, 2024

This PR adds a commonMain implementation of log chunking that can be applied to any log writer.

Logger.setLogWriters(platformLogWriter().chunked())
Logger.setTag("MyTag")
Logger.i { "Hello Kotlin" }

The chunked() method defaults parameters for max / min chunking and returns a wrapped log writer that breaks long messages and feeds them to the wrapped writer.

This PR relates to #394

@psh psh changed the title Chunked log writer that breaks long messages Chunked log writer that breaks up long messages May 7, 2024
@Nek-12
Copy link

Nek-12 commented May 14, 2024

Need to regenerate the api surface @psh

@samhill303 samhill303 self-assigned this Jun 4, 2024
@samhill303
Copy link
Collaborator

@psh I've merged #398 which should allow you to pass CI once you update

@psh psh force-pushed the psh/chunked-log-writing branch from 19ce1fc to 47cb3ef Compare June 7, 2024 21:09
@samhill303 samhill303 merged commit 9802a60 into touchlab:main Jun 10, 2024
2 checks passed
@psh psh deleted the psh/chunked-log-writing branch June 10, 2024 14:45
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.

3 participants