Home › IT ops & DevOps › Explain logs and errors: how to do it with AI

Explain logs and errors: how to do it with AI

Last checked

From official vendor pages; selected tasks also include dated logged-out free-plan trials. Report an error.

Beginner Risk: Low 🛠️ IT ops & DevOps

Paste an error message or a slice of a log and an assistant suggests what probably went wrong and what to check next. It shortens the time between "something broke" and "I know where to look".

Who it’s for: Sysadmins, helpdesk staff, DevOps engineers and developers on call.

Why low risk: Reading logs changes nothing, but logs often contain usernames, IPs and tokens, and a wrong diagnosis can waste time.

Best pick

ChatGPT has the highest score on our published rubric (94/100) of the 4 tools listed for this task. Free plan has unlimited text chats, enough for most error messages.

Step by step

  1. Copy the error plus about 20 lines before it, not the whole log file.
  2. Remove or mask tokens, passwords, IPs, hostnames and usernames.
  3. Say what the system is, what changed recently and what you already tried.
  4. Ask for the 3 most likely causes, ranked, with the evidence line for each.
  5. Ask for read-only commands to confirm each cause before any fix.
  6. Apply one fix at a time and note the result.

AI prompts to explain logs and error messages

Replace the [brackets] with your details. See all prompt examples

Rank the causes
Here's an error from [system/version] after [recent change]. Give the 3 most likely causes, ranked, quoting the log line that supports each. Then give a read-only command to confirm each one.

[paste masked log]
Explain the message
Explain this error in plain words: what component raised it, what it was trying to do, and what usually causes it. Don't suggest fixes yet.

[paste]
Write the incident note
Using this log and what we found ([findings]), write a short incident note: what happened, impact, root cause, fix, and one prevention step.

Illustrative example

You paste

nginx on Ubuntu, started after a config change:
[emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

A good answer looks like

Most likely: another process already uses port 80 (often a second nginx or Apache).
Confirm (read-only): sudo ss -ltnp | grep ':80'
If it's Apache: decide which server should own port 80 before stopping anything.
Less likely: a duplicate listen 80 line in your new config. Check with: sudo nginx -t

Illustrative example written for this guide, not output captured from a specific tool.

Safe practice

Which tool to pick, and why

Reasons come from the capabilities, free-plan details and prices we've checked on official pages (separate from any dated trial above). Sources: claude.com/pricing · chatgpt.com/pricing · cursor.com/pricing · github.com/features/copilot/plans

Common mistakes

Privacy tip

Mask anything that identifies people or systems: usernames, emails, IPs, hostnames, session IDs and bearer tokens. Rotate any secret you pasted by mistake.

Claude (incl. Claude Code) setting · ChatGPT (incl. Work & Codex) setting · Cursor setting · Sources: privacy.claude.com/en/articles/12109829-how-do-i-change-my-model-improvement-privacy-settings · help.openai.com/en/articles/7730893-data-controls-in-chatgpt · cursor.com/help/security-and-privacy/privacy

Related tasks

Report an error on this page