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

Truncate the center of log files #133

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JulianVennen
Copy link
Member

This PR changes the length filter to truncate logs in the middle instead of truncating the end.

The beginning and end of a log file are usually the most interesting parts, as the beginning contains important version information used to detect the software and the end contains the error message of a crash.

The implementation was needed in both PHP and JS because this should work both for people using the API and the website (which already applied the old filter client side to prevent issues with upload limits).
Both implementations insert the same message at the center of the log:

===================
Truncated 593 lines
===================

I also changed the order of the length and lines filter to make sure that logs which reach both limits have their lines removed first.

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