Logsflags: g

Log Level

Matches standard log level keywords in log lines.

Try it in RegexPro

Pattern

regexJavaScript
/\b(TRACE|DEBUG|INFO|WARN|ERROR|FATAL)\b/g

Raw source: \b(TRACE|DEBUG|INFO|WARN|ERROR|FATAL)\b

How it works

`\b(TRACE|DEBUG|INFO|WARN|ERROR|FATAL)\b` matches any of the six standard log levels as whole words.

Examples

Input

[INFO] Server started. [ERROR] Connection failed.

Matches

  • INFO
  • ERROR

Input

DEBUG: cache miss

Matches

  • DEBUG

Common use cases

  • Log filtering
  • Alerting
  • Error triage

Related concepts