Skip to content
CheckcraftDownload
Practical workflow

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

Checkcraft is a desktop app for checking APIs and logs without code, with a free edition. Download, no sign-up →

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 ·

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.

Diagram: one request goes through a gateway and services, all log records share one traceId

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

WhatWhere 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 servicessystemd journal: journalctl -u service_name
nginx/var/log/nginx/access.log and error.log
Apache/var/log/apache2/ or /var/log/httpd/
PostgreSQLlog directory in the cluster data or /var/log/postgresql/
Dockerdocker logs container_name
Windows, systemEvent Viewer (eventvwr.msc): System, Application, Security logs
Windows appsusually %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.

API call diagram: method and URL, headers, body, status and response body, logs and database

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.

All guides in the logs section

Frequently asked questions

What is a log file?

A journal where a program records its actions and errors with timestamps.

Where are logs on Linux?

/var/log: syslog or messages, auth.log or secure, app subfolders; journalctl for systemd.

Where are logs on Windows?

Event Viewer (eventvwr.msc) and app folders under %LOCALAPPDATA%, %APPDATA%, %PROGRAMDATA%.

Can I delete log files?

Old ones yes; better configure rotation with logrotate or systemd limits.

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 FreeDownload and first run

No sign-up or email needed, the archive is ready in a couple of minutes. See the edition limits.

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.

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

No account required. We will reply by email. This is a support request, not a newsletter subscription.