# Log file: what it is, where it is stored and how to read logs on Linux and Windows

Source: https://checkcraft.ru/en/guides/log-file-basics.html · updated 2026-11-24

What a log file is in plain words, types of logs, where they live on Linux, Windows, web servers and apps, how to open and read a log…

Practical workflow

Checkcraft is a desktop app for checking APIs and logs without code, with a free edition. [Download, no sign-up →](https://checkcraft.ru/en/download-checkcraft.html#free-download)

A log file is a journal where a program records what it did: start-up, requests, warnings and errors, each entry with a timestamp. When something breaks, the log is the first place to look. Below is where logs live on Linux, Windows and in popular programs, how to open them and how to find an error quickly.

Checkcraft · 24 November 2026

Get help with your first test →

## What goes into a log

Each line usually has a timestamp, a level and a message: INFO for normal events, WARN for suspicious ones, ERROR for failures. Service logs often include a traceId, which collects all entries of one operation across services.

## How to find an error in a log

Do not read the whole log. Filter ERROR and the time of the problem first, then look at a few lines before the first error: the cause is usually there, not in the last line. If there is a traceId, search by it directly.

Searching Kibana after every request? Checkcraft finds the record by traceId and checks it together with the response. [Download Free →](https://checkcraft.ru/en/download-checkcraft.html#free-download)

## Can logs be deleted

Old logs can be deleted, but better set up rotation: logrotate on Linux, and systemd limits the journal size itself. Before deleting, keep logs from the period with problems: you will need them for analysis.

## Where logs live

| What | Where to look |
|---|---|
| Linux, system | /var/log/syslog (Debian, Ubuntu) or /var/log/messages (RHEL, CentOS) |
| Linux, logins and sudo | /var/log/auth.log or /var/log/secure |
| Linux, systemd services | systemd journal: journalctl -u service_name |
| nginx | /var/log/nginx/access.log and error.log |
| Apache | /var/log/apache2/ or /var/log/httpd/ |
| PostgreSQL | log directory in the cluster data or /var/log/postgresql/ |
| Docker | docker logs container_name |
| Windows, system | Event Viewer (eventvwr.msc): System, Application, Security logs |
| Windows apps | usually %LOCALAPPDATA%, %APPDATA% or %PROGRAMDATA% in the app folder |

Exact paths depend on the distribution and settings; if a file is missing, check the program config, usually a log, logfile or log_dir option.

## Anatomy of a log line

```
2026-11-24T14:03:12.481Z ERROR payments traceId=4bf92f35 order=5004 card_declined: Payment declined by bank
└── время ──────────────┘ └уровень┘ └сервис┘ └─ идентификатор ─┘ └──────── сообщение ────────────────────┘
```

The stricter the format, the easier the search. Many services log JSON, one line per event, which is easy to parse and ship to Kibana or Loki.

## Commands to read logs

```
# последние 100 строк и дальше в реальном времени
tail -n 100 -f /var/log/nginx/error.log

# только ошибки
grep -i "error" /var/log/syslog | tail -n 50

# все записи одного запроса по traceId
grep "4bf92f35" /var/log/app/*.log

# журнал сервиса за час, только ошибки
journalctl -u payments --since "1 hour ago" -p err

# Windows PowerShell: последние ошибки журнала Приложение
Get-WinEvent -LogName Application -MaxEvents 50 | Where-Object LevelDisplayName -eq "Ошибка"
```

With more than one server, SSH into each is slow; collect logs centrally. See [log analysis tools](https://checkcraft.ru/en/guides/log-analysis-tools.html).

## All guides in the logs section

- [Log analysis tools: 9 options and how to choose in 2026](https://checkcraft.ru/en/guides/log-analysis-tools.html)
- [Log monitoring: how to get alerts about errors in logs](https://checkcraft.ru/en/guides/log-monitoring.html)
- [Log analysis without programming: where to start](https://checkcraft.ru/en/guides/log-analysis-no-code.html)
- [Search logs by traceId online: find every line of a request and its errors](https://checkcraft.ru/en/guides/log-search-online.html)
- [traceId: what it is and how to find a request in the logs](https://checkcraft.ru/en/guides/trace-id.html)
- [Find request logs by traceId in Kibana](https://checkcraft.ru/en/guides/kibana-logs-search.html)
- [Automate API and log checks with Kibana](https://checkcraft.ru/en/guides/api-kibana-workflow.html)
- [An API client that checks Kibana logs and the database, not just the response](https://checkcraft.ru/en/guides/api-client-kibana-logs-database.html)
- [How to give an AI agent access to logs without handing over SSH or passwords](https://checkcraft.ru/en/guides/ai-agent-log-access.html)

Next step

## Repeat this on your own API

Checkcraft is a desktop app that saves API response checks without code and shows what did not match. Start with a sample, then use your own sanitized data. Free runs on Windows and Linux with no time limit.

[Download Free](https://checkcraft.ru/en/download-checkcraft.html#free-download) · [Download and first run](https://checkcraft.ru/en/download-checkcraft.html)

No sign-up or email needed, the archive is ready in a couple of minutes. See the [edition limits](https://checkcraft.ru/en/pricing.html).

## Continue with a related task

[Log analysis tools: 9 options and how to choose in 2026](https://checkcraft.ru/en/guides/log-analysis-tools.html) · [Log monitoring: how to get alerts about errors in logs](https://checkcraft.ru/en/guides/log-monitoring.html) · [traceId: what it is and how to find a request in the logs](https://checkcraft.ru/en/guides/trace-id.html) · [Search logs by traceId online: find every line of a request and its errors](https://checkcraft.ru/en/guides/log-search-online.html) · [Log analysis without programming: where to start](https://checkcraft.ru/en/guides/log-analysis-no-code.html)

Start with the linked example and compare its result with your own test requirement.

Ask a person

## Get help with your first test

Tell us what you want to test or where you got stuck. We can help you start Checkcraft, choose an example and understand your first run. You can ask before downloading.

[Ask in Telegram](https://t.me/checkcraftchat)Send an email

The Telegram group is public: do not post passwords, tokens or confidential work data. A description of your task is enough to start.

You can also email us support@checkcraft.ru

Page card: /ai/pages/en/guides/log-file-basics.md
