Ideolog (PyCharm): how to configure log format for standard logging library

if you don't want to struggle much with regular expressions you can do an easy one

(INFO)

will match "INFO" and you can do the rest for the other levels for a quick visualization.


I just had the same issue.

I used the following config:

My logging format looks like this:

"%(asctime)s %(name)-30s %(levelname)-8s %(message)s"

Log Parsing Pattern:

pattern="^(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2},\d{3})\s(\S*)\s*(\w*)\s*(.*)$" timePattern="yyyy-MM-dd HH:mm:ss,SSS" linePattern="^\d" timeId="0" severityId="2" fullmatch="true"

Log Hightlight Patterns:

pattern="^\s*ERROR?\s*$" action="HIGHLIGHT_LINE" fg="-65536" stripe="true"
pattern="^\s*WARNING?\s*$" action="HIGHLIGHT_LINE" fg="-22016" bold="true"
pattern="^\s*INFO\s*$" action="HIGHLIGHT_LINE" fg="-12599489"
pattern="^\s*DEBUG\s*$" action="HIGHLIGHT_LINE" fg="-14927361" stripe="true"
pattern="^\s*CRITICAL\s*$" action="HIGHLIGHT_LINE" fg="-65536" bold="true" italic="true" stripe="true"

HTH and YMMV...