Open CJDennis opened 5 years ago
Have you tried reopening the log file? Currently there's an issue where changing the settings doesn't apply until the file is closed and opened again.
If I've understood the wiki correct it requires that at least 5 lines are matching your pattern https://github.com/JetBrains/ideolog/wiki/Custom-Log-Formats#log-format-detection
In other words: You need at least 5 matching lines in the first 25 lines of your log file.
@knah I was shutting down PhpStorm and restarting it. @tflori I had several Apache files open longer than 5 lines. I was just showing those four lines as representative.
There was an update yesterday and it's working a bit now, but it's still hard to use. I've got HTTP codes 1XX, 2XX, and 3XX in green, 4XX in orange, and 5XX in red. I don't have any 5XX codes in the log, but the others are working properly.
I'm still not sure what you're supposed to do with the time format. Once it's recognised, what does it do?
@tflori OMG you legend. I have been trying to get this to work for over an hour.
This is so stupid. It should at least say that there are not enough lines, or better yet if 100% of the lines match one pattern and none of the others then surely this is a good enough match.
I'm trying to match the following lines from the Apache access log:
I would have thought
^(\S+)\s(\S+)\s(\S+)\s\[(([^\[\]]+)\s([^\[\]]+))\]\s"([^"]+)"\s(\S+)\s(\S+)$
would work, with the Severity in field 8.However, nothing, not even
^(?s).*$
matches any Apache log lines. It always says "Log format not recognised". If I copy the IntelliJ IDEA log format into a new line, it does work for IDEA log files, but I can't work out what the difference is between the IDEA format and the Apache format that's preventing it from working for any Apache files.