Error message and logs

  • Standard term
2 steps

An error message is software's report that something failed. Logs are the running record of what the software did over time, normal activity included, as far as the app was set up to record it.

A program writes an error when a step hits something it can't handle, such as a missing file. Log lines are time-stamped and usually tagged with a level, from routine information up to warnings and errors. An error often comes with a stack trace, the list of code that was running when it failed.

Where you’ll meet it

Your family budget app, which you built with an AI, shows “Import failed” when you upload this month's bank statement. Last month's upload worked. You're about to tell your AI “the import is broken” and ask it to fix it.

What to do

Copy the exact error text, and ask your AI where the app writes its logs and which lines come from the minute the upload failed. Remove account numbers before you paste anything, then ask it to find what differs from last month's upload before it changes any code.

Easy to mix up

Where does it live?
Error message and logsBug
On screen or in a log file, as text the program wroteIn the software itself, as the mistake behind the failure

Check yourself

Your recipe app crashes with the error “division by zero at line 88,” in the code that scales ingredient amounts to a new number of servings. Two seconds before the crash, the log shows “import finished: Pancakes, servings: 0.” Where should you start looking?

Go deeperOnline apps write the full error where visitors can't see it

A stack trace names files, functions, and sometimes data, which helps an attacker as much as a developer. So a hosted app usually shows a line such as “Something went wrong” and sends the trace to the server's logs, the first place to look when it fails.

Stack traces run in opposite orders across languages. Python lists the most recent call last, so the error itself sits at the bottom, while JavaScript and Java print the error first, with the code that called it underneath.

Larger systems give each request, a single message asking the server to do something such as load a page or save a form, an ID that appears on every log line it touches. That lets you pull one failed request out of thousands.

Practice Build Basics

Or take the learning quiz on a mix of every set