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

Logs are not chunked on Android #394

Closed
Nek-12 opened this issue Apr 12, 2024 · 5 comments
Closed

Logs are not chunked on Android #394

Nek-12 opened this issue Apr 12, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@Nek-12
Copy link

Nek-12 commented Apr 12, 2024

Kermit does not split long log statements into separate log invocations. As a result, any string longer than 4096 characters is cut off (not printed fully). This disallows using Kermit for e.g. http response logging. An example implementation of message splitting can be taken from Ktor or FlowMVI

@samhill303
Copy link
Collaborator

We think the best way to accomplish this would be to implement a "ChunkedLogWriter" that can be used if desired as opposed to updating the default implementation. We a log writer that does that chunking could definitely be useful though. We'll add to our backlog, but welcome Pull Requests

@samhill303 samhill303 added the enhancement New feature or request label Apr 30, 2024
@Nek-12
Copy link
Author

Nek-12 commented Apr 30, 2024

The default implementation should be to send logs as chunked. Most people wouldn't expect their logs to just suddenly be cut off.

@samhill303
Copy link
Collaborator

Sorry if I misspoke by saying default implementation. What I meant is that the character limit is specific to logcat and wont necessarily be the same for other tools. For that reason it will be the responsibility of the LogWriter's to handle chunking correctly

@Nek-12
Copy link
Author

Nek-12 commented May 7, 2024

Yes, as far as I know, only android restricts log lines to 4096 symbols. Other platforms probably have 65536 char limit.

@samhill303
Copy link
Collaborator

2.0.4 has been deployed with @psh 's ChunkedLogWriter. Thanks for the input and let us know if you have any issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants