Closed thalassa-web closed 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.
Yes I tried! I also tried to restart PhpStorm!
Something weird … I opened another log file. This one was OK. I closed all log files, and now it's working …
In my case it started to work after I manually edited log file (any edit to trigger file update).
I create a new Log format like this :
^\[(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})\]\s+(\w+).(\w+):\s+(.*)$
^\[
I've tested the pattern with https://www.freeformatter.com/java-regex-tester.html#ad-output Entry to test : [2019-05-10 11:14:04] request.INFO: Matched route "index". {"route":"index","route_parameters":{"_route":"index","_controller":"App\Controller\Web\AccueilController::index"},"request_uri":"http://localhost:8000/","method":"GET"} []
Results: Match # | Group index | Start index | End index | Group content 1 | 0 | 0 | 234 | [2019-05-10 11:14:04] request.INFO: Matched route "index". {"route":"index","route_parameters":{"_route":"index","_controller":"App\Controller\Web\AccueilController::index"},"request_uri":"http://localhost:8000/","method":"GET"} [] 1 | 1 | 1 | 20 | 2019-05-10 11:14:04 1 | 2 | 22 | 29 | request 1 | 3 | 30 | 34 | INFO 1 | 4 | 36 | 234 | Matched route "index". {"route":"index","route_parameters":{"_route":"index","_controller":"App\Controller\Web\AccueilController::index"},"request_uri":"http://localhost:8000/","method":"GET"} []
So, my pattern works, my log file begin with the tested string, but I still have the message : "Log format not recognized"