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

Modify log content in descending order before returning #43

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from

Conversation

Joemires
Copy link

@Joemires Joemires commented Sep 6, 2024

This PR adds a PHP script to reverse Laravel log entries while preserving the original format, including timestamps and structure. The log entries are now displayed in descending order, with the most recent logs appearing first. This enhancement improves log readability, especially for troubleshooting recent issues.

Key Changes:

  • Utilizes preg_split() to split log entries based on their timestamp.

  • Reverses the order of log entries using array_reverse().

  • Ensures that log format and timestamps are preserved.

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