You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello there -- first off, thank you for building this and saving us all the trouble of building our own regular expressions to parse Apache's log files.
When I tried using this package on my actual real world Apache logs, it mostly worked. However, there were a number of different lines where it failed to parse logs and threw an exception in my program. Here's one example
Hi. This case is similar to #49, which involves badly formed HTTP requests. Given they're not technically valid, I don't know how much value do you get parsing them, but the $parser->addPattern('%r', '(?P<request>.+)'); trick mentioned there is a good workaround if the main parsing failed.
I'd keep parsing logs with the format you have and have a second instance of LogParser configured with the addPattern and parse the line again to extract things like IP address and User-Agent.
Hello there -- first off, thank you for building this and saving us all the trouble of building our own regular expressions to parse Apache's log files.
When I tried using this package on my actual real world Apache logs, it mostly worked. However, there were a number of different lines where it failed to parse logs and threw an exception in my program. Here's one example
My log format looks like this
Here's one line that failed to parse
and here's a few others
Is there a way to configure this library to be less strict when trying to parse these log lines?
If not, do you have any time/interest in enhancing the functionality of this library so it can handle cases like these?
The text was updated successfully, but these errors were encountered: