-
Notifications
You must be signed in to change notification settings - Fork 55
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
Incorrect multiline messages initial detection #48
Comments
I have a very similar situation, and decided to play around with it for a while. After many tries, It seems that the maximum multi-line part (the lines that are not the first line in a multi-line log) in the first 5 log lines must be less than 20 lines. Otherwise the log type detection will fail. Here is an example of default Monolog format:
Any more multi-line part in the first 5 messages would cause the detection to fail, but adding new lines to all messages below would be fine. This is actually quite annoying as there could be logs that begin with some long stack traces in the first few messages, and they would cause the whole file to become not recognized. EDIT: I then realized that there must be more than 5 messages in the first 25 lines to make the plugin correctly recognize the format. Maybe making the limit more relaxed would be a good choice? |
Got the same issue with Monolog. +1 for @HarukaMa 's proposal. |
same problem |
Fixed in #165. Will be released in the next version. Thanks for your feedback! |
Supposedly an initial pattern detection in logs with multiline entries doesn't work properly. Currently if the first few messages include stack traces, the patterns are disabled because the rule matching more than 5/25 lines fails.
Example multiline message with a stack trace:
Removing stack traces from the first few messages allows to detect patterns correctly for the whole file. The initial detection should ignore lines not matching "Message start pattern".
There is also a similar problem when there is fewer than 5 lines in the log.
Settings:
Message pattern:
^(\d{4}-\d\d-\d\d\s\d\d:\d\d:\d\d\.\d{3})\s+[^\[]*\[\s*([^\]]*)\]\s+(\w+)\s+(.*)$
Message start pattern:
^\d
Time:
yyyy-MM-dd HH:mm:ss.SSS
The text was updated successfully, but these errors were encountered: