# Structured Logging

*noun*

say it: **“STRUK-cherd LAW-ging”** **/ˈstrʌktʃərd ˈlɔɡɪŋ/**

Writing log messages as records with named fields, such as the time, the level and an id, so tools can search them.

## What is **structured logging**?

**Structured logging** writes each log as a record with named fields, such as the time, the level and an order id, usually as one line of JSON. Tools can then search and filter the logs, such as every error for order 1042.

```json
{"level":"error","time":"2026-11-17T09:30:00Z","orderId":1042,"msg":"payment declined"}
```

## In a sentence

- “Switching to **structured logging** turned free-form console lines into JSON the log tool could filter.”
- “With **structured logging**, finding every failed payment is one search: level is error and route is /pay.”

Level: Journeyman · [More Software Development terms at this level](https://www.ask-codey.com/glossary?category=software-development&level=3)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/structured-logging
