Skip to content

Instantly share code, notes, and snippets.

@froemken
Last active October 14, 2025 07:33
Show Gist options
  • Save froemken/58c8abf398e88b2b81129e44a23df2d9 to your computer and use it in GitHub Desktop.
Save froemken/58c8abf398e88b2b81129e44a23df2d9 to your computer and use it in GitHub Desktop.
Highlight and parse TYPO3 CMS logs in PhpStorm’s “Log File Colors & Formatting”
<!--
TYPO3 PhpStorm Log Parser Configuration
=======================================
Author: Stefan Froemken
Purpose: Highlight and parse TYPO3 CMS logs in PhpStorm's "Log File Colors & Formatting"
This configuration extracts and color-codes log fields:
Timestamp, Severity, Request, Component, and Message.
REGEX Parsing Definition
========================
Message Pattern:
^(\w{3}, \d{2} \w{3} \d{4} \d{2}:\d{2}:\d{2} [+-]\d{4}) \[([A-Z]+)\] request="([0-9a-f]+)" component="([^"]+)"[: ] (.*)$
Message Start Pattern:
^\w{3}, \d{2} \w{3} \d{4}
Time format:
EEE, dd MMM yyyy HH:mm:ss Z
Captured groups:
1 -> Time capture group
2 -> Severity capture group
Recommended Colors & Styles
===========================
For PhpStorm -> Settings -> Editor -> Log Highlighting -> Pattern
# Pattern: Severity (Highlight line, Capture group: 2)
^EMERGENCY -> #FF1744 Bold
^ALERT -> #FF5252 Bold
^CRITICAL -> #FF7043 Bold
^ERROR -> #FF9800 Italic
^WARNING -> #FFC107 Italic
^NOTICE -> #8BC34A Italic
^INFO -> #2196F3 Normal
^DEBUG -> #9E9E9E Normal
# Pattern: Request ID (Highlight field. Capture group: 5)
Regex: request="^[0-9a-f]+"
Color: #B39DDB
Style: Normal
# Pattern: Component (Highlight field. Capture group: 7)
Regex: component="^[\w+\.]+"
Color: #4DB6AC
Style: Italic
-->
<State>
<highlightingPatterns />
<parsingPatterns>
<LogParsingPattern
name="TYPO3"
pattern="^(\w{3}, \d{2} \w{3} \d{4} \d{2}:\d{2}:\d{2} [+-]\d{4}) \[([A-Z]+)\] request=&quot;([0-9a-f]+)&quot; component=&quot;([^&quot;]+)&quot;[: ] (.*)$"
timePattern="EEE, dd MMM yyyy HH:mm:ss Z"
linePattern="^\w{3}, \d{2} \w{3} \d{4}"
timeId="0"
severityId="1"
uuid="d35ba6a4-39bc-42f6-94df-4ab52496c078"
/>
</parsingPatterns>
<settingsVersion>13</settingsVersion>
</State>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment