Open codestylist opened 3 years ago
+1
You must update the patters like this:
^\s*[E|e](rror)?[:|\s]*$
^\s*[W|w](arn(ing)?)?[:|\s]*$
^\s*[I|i](nfo)?(:|\s)*$
^\s*[N|n](otice)?(:|\s)*$
You must update the patters like this:
^\s*[E|e](rror)?[:|\s]*$
^\s*[W|w](arn(ing)?)?[:|\s]*$
^\s*[I|i](nfo)?(:|\s)*$
^\s*[N|n](otice)?(:|\s)*$
Thank you for this. While it is useful, it is still not completed and still hard to read.
Thank you for this. While it is useful, it is still not completed and still hard to read.
Make sure you select Highligh Line.
Thank you for this. While it is useful, it is still not completed and still hard to read.
Make sure you select Highligh Line.
Thank you. Looks better
With some modification of the color it works like a charm. Thank you @harlet !
You must update the patters like this:
^\s*[E|e](rror)?[:|\s]*$
^\s*[W|w](arn(ing)?)?[:|\s]*$
^\s*[I|i](nfo)?(:|\s)*$
^\s*[N|n](otice)?(:|\s)*$
Hi @harlet & @fearlex , sorry for mentioning you both 🙏 Tried those patterns, but couldn't manage it to work. Maybe I'm doing it in-correctly?
Hello @contactjavas, have you found a solution?
Hey all,
I am also having some troubles making this work for WordPress error logs. Note that I have not tried the other like Laravel.
One thing I found is when some chages are made to the "Log Formats", we need to close and reopen back the IDE completely, in my case PHPStorm. The log formats are probably loaded at opening. This does not apply to the "Patterns". Maybe there is a way to invalidate it, but I do not know it...
I am not a pro with regex and I am using Regex 101 to test outside Ideolog to make sure the regex are working.
The following regex formula works, but not with Ideolog.
Log Format :
Message pattern : ^\[([^]]+)\]\s+([\w\s]+:)\s+(.+)$
Message sart pattern : ^\[
Time format : dd-mm-yyyy HH:mm:ss
This regex creates a 3 groups. One for the date and time including the brackets , the second to capture the errors/warning/notice... and the last one, the message.
The message : [22-Mar-2024 18:33:10 UTC] PHP Notice: La fonction map_meta_cap a été appelée de façon incorrecte. Lors de la vérification de la fonctionnalité edit_comment, vous devez toujours la comparer à un commentaire spécifique. Veuillez lire Débogage dans WordPress (en) pour plus d’informations. (Ce message a été ajouté à la version 6.1.0.) in /home/.../***.com/wp-includes/functions.php on line 6031
Group 1 should be the date and time. \[([^]]+)\]
Group 2 should be the notice it self. \s+(PHP\s[N|n]otice:)\s+
Group 3 should be the message.
I have tested so many possibliites of patterns and patterns options (field & match), I am out of options. I think this plugin does not work as expected. I got some colors but it was not matching what would be expected.
I would request the enhancement to include support for the WordPress debug.log format. Hope it is possible. Thanks!