You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, make a new Log Format
The regex that I used is ^(\d{2}:\d{2}:\d{2})\s(\[[A-Z]*\])(\s\|\s)(.*)$ link to how my regex works
Then add all the colors for the patterns that you want, here's how I have mine
[WARNING]^.*\s*(\[WARNING\]).*
[ERROR]^.*\s*(\[ERROR\]).*
[FATAL]^.*\s*(\[FATAL\]).*
[INFO]^.*\s*(\[INFO\]).*
[DEBUG]^.*\s*(\[DEBUG\]).*
[TRACE]/[TRACEBACK]^.*\s*(\[TRACE|TRACEBACK\]).*
Timestamp^(\d{2}:\d{2}:\d{2})
Helpful tips
I cannot stress enough how much regex101 saved me while I was doing this, i quite literally learned how regex works with this
Ideolog uses a very unusual implementation of regex, meaning that something that would work literally anywhere else, might not work with this, for example, ending your regex with /i to make everything case insensitive, does not work
If you think something should have changed, but doesn't, try restarting your ide
if you have any questions that I might have left out, reply here, if I don't respond after a while, dm me on discord not_a_cow
The text was updated successfully, but these errors were encountered:
Thanks for this. Appreciate the effort. This experience really does make one feel like a bit of an idiot.
2 questions if I may
Any hints on testing?
I still get the "Log format not recognized" and I'm pretty sure I have a match.
regex101 says it works but there's no indication
Got it working through sheer dumb luck, but now I can't find the config anymore.
I was navigating to the idealog config earlier only because O was getting the "Log format not recognized" error on opening log files.
But now that I have a valid format, the error's gone and I can't find the settings.
Instead of you trying to figure out how to work this for 4 hours straight like i did, read this (hopefully) helpful explanation of what i did
Here's how I have mine set up to look
note that my format is
HH:mm:ss [<log>] | <message>
And here's how I did that in python
First, make a new Log Format
The regex that I used is
^(\d{2}:\d{2}:\d{2})\s(\[[A-Z]*\])(\s\|\s)(.*)$
link to how my regex works
Then add all the colors for the patterns that you want, here's how I have mine
[WARNING]
^.*\s*(\[WARNING\]).*
[ERROR]
^.*\s*(\[ERROR\]).*
[FATAL]
^.*\s*(\[FATAL\]).*
[INFO]
^.*\s*(\[INFO\]).*
[DEBUG]
^.*\s*(\[DEBUG\]).*
[TRACE]/[TRACEBACK]
^.*\s*(\[TRACE|TRACEBACK\]).*
Timestamp
^(\d{2}:\d{2}:\d{2})
Helpful tips
I cannot stress enough how much regex101 saved me while I was doing this, i quite literally learned how regex works with this
Ideolog uses a very unusual implementation of regex, meaning that something that would work literally anywhere else, might not work with this, for example, ending your regex with
/i
to make everything case insensitive, does not workIf you think something should have changed, but doesn't, try restarting your ide
if you have any questions that I might have left out, reply here, if I don't respond after a while, dm me on discord
not_a_cow
The text was updated successfully, but these errors were encountered: