Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Truncate debug logs at the start, not the end #3484

Merged
merged 1 commit into from
Sep 26, 2019

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Sep 26, 2019

We left out later parts if we exceeded the maximum log size, which
was deeply unhelpful since the problem almost certainly happened
just before the user hit the 'submit debug logs' button.

Instead, iterate backwards through the fragments and prepend them,
leaving off the earlier ones if we run over the size.

Also, check we're not going to run over the size before adding
the fragment so we might actually stick to the maximum log size.

May fix element-hq/element-web#10951

We left out later parts if we exceeded the maximum log size, which
was deeply unhelpful since the problem almost certainly happened
just before the user hit the 'submit debug logs' button.

Instead, iterate backwards through the fragments and prepend them,
leaving off the earlier ones if we run over the size.

Also, check we're not going to run over the size before adding
the fragment so we might actually stick to the maximum log size.

May fix element-hq/element-web#10951
@dbkr dbkr requested a review from a team September 26, 2019 17:50
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sensible to me! 😁

@dbkr dbkr merged commit 509833e into develop Sep 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Truncated rageshake logs & possibly related UISIs
2 participants