Logs

Nginx Error Log

Parses Nginx error log lines.

Try it in RegexPro

Pattern

regexJavaScript
/^(\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2}) \[(\w+)\] (\d+)#(\d+): (.*)$/

Raw source: ^(\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2}) \[(\w+)\] (\d+)#(\d+): (.*)$

How it works

Captures timestamp, log level, PID, TID, and the error message from standard Nginx error log format.

Examples

Input

2023/10/11 10:00:00 [error] 1234#5678: *1 connect() failed

Matches

  • 2023/10/11 10:00:00 [error] 1234#5678: *1 connect() failed

Common use cases

  • Nginx monitoring
  • DevOps dashboards
  • Incident response