Skip to content

Stuck figuring out how to get ideolog working? read this #193

@not-a-cowfr

Description

@not-a-cowfr

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
image
note that my format is HH:mm:ss [<log>] | <message>

And here's how I did that in python

import logging as log
formatter = log.Formatter('%(asctime)s [%(levelname)s] | %(message)s', datefmt='%H:%M:%S')

First, make a new Log Format
image
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\]).*
image

[ERROR] ^.*\s*(\[ERROR\]).*
image

[FATAL] ^.*\s*(\[FATAL\]).*
image

[INFO] ^.*\s*(\[INFO\]).*
image

[DEBUG] ^.*\s*(\[DEBUG\]).*
image

[TRACE]/[TRACEBACK] ^.*\s*(\[TRACE|TRACEBACK\]).*
image

Timestamp ^(\d{2}:\d{2}:\d{2})
image

Helpful tips

  1. I cannot stress enough how much regex101 saved me while I was doing this, i quite literally learned how regex works with this

  2. 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

  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions