-
Notifications
You must be signed in to change notification settings - Fork 64
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
FormatException when line contains domain\\user_name #57
Comments
I seems that it will work if you update pattern for %u like below
|
I'm unsure how to trigger this in the wild with a standard Apache/Nginx installation for a long term fix, but if you're looking for a quick and clean workaround, you can use |
I tried the following custom patterns:
But none of these works. I always get FormatException. If I change the pattern directly in your LogParser.php like this It seems there is missing updating of the variable $pcreFormat in LogParser.php after calling function addPatern(...). I tried to modify the function addPattern like below and then it worked
But this would not use own format. You would have to have the variable $format in the construct have as class variable, Thank you |
My issue #59 appears to be a duplicate of this one. |
Hi @jiriermis. I've just merged #60 into Thank you. |
Hi @kassner The parser doesn't work for common format of Apache log if the line contains backslashe. e.g.: Two backslashes are normal in the apache log for remote user if there is running NTML authentication on the webserver. I have to add the pattern like below:
It's just a bit of a shame that it can't do it by default. Anyway thank you for your concern |
Hello,
i am getting Kassner\LogParser\FormatException when a line contains domain user name.
::1 - DOMAIN\\user_name [03/Feb/2023:18:50:42 +0100] "GET /app/index.php HTTP/1.1" 200 229931
Do you have any idea how to fix it please?
Thank you
The text was updated successfully, but these errors were encountered: