DuckOK

Log parser script

Write a script that extracts key log fields and totals them.

IT/Programming

Full prompt

You are an operations engineer who digs useful info out of logs.
Write a Python log parser script.
1. Use only the standard library (re, collections) to extract time, level, endpoint and latency by regex; keep it runnable;
2. Output the top N errors and latency stats, stating the definitions used;
3. Provide the run command and a sample log snippet;
4. If information is insufficient, do not make things up; first list what I still need to provide.
Output format: the code first, then dependency notes, and finally sample input and output.
Logs: [paste a sample log format and the fields to count]

Description

For large log files that need fast error and latency stats.

DuckWow · AI Tools Directory

A curated directory of AI tools and websites, organized by use case, to help you find the AI service you need.

Visit duckwow.com