.log

Log files: what they are and how to open them

A log file is a plain text record that an app, server or device writes as it runs, usually one timestamped line per event. Drop one here to read and search it, even a large one.

Drop your log file here

Opens on this device. Nothing is uploaded. Any other file works too.

What is a log file?

Programs keep logs to record what they did and what went wrong: a web server notes every request, an installer every step, an app every error. Support teams ask for them because a log shows the order of events that led to a problem. A .log file has no owner and no single format; most are plain text that any text editor can show.

A few layouts are widespread. Web servers often write the Common Log Format, one request per line. Unix systems use syslog, which Eric Allman created on BSD Unix and the IETF standardized as RFC 5424 in 2009. Notepad has its own small trick: type .LOG on the first line of a text file and it adds the date and time each time you open it.

Not everything called a log is text. Windows Event Viewer keeps events in .evtx files, Windows Update writes .etl traces, and the registry keeps binary .log transaction files beside its hives. macOS keeps its system log in its own store rather than in text files, and you read it with the Console app.

What is inside

A text log is written one event per line, added to the end as things happen, so the newest entries are at the bottom. A typical line starts with a date and time, then a severity such as error or warning, the part of the program that wrote it and a message. A crash report or stack trace may run over several lines.

Busy programs rotate their logs: when a file reaches a size or age limit it is closed and a new one started, and old ones get a number or date in the name and are often compressed to .gz. Many logs are UTF-8, but Windows PowerShell 5.1 saves redirected output (command > out.log) as UTF-16, which looks spaced out or garbled in an editor that guesses wrong.

One line of a web server access log in the Common Log Format, the example from the Apache documentation.

How to open a log file

Windows

  • NotepadBuilt in. Reads any text log and searches it with Ctrl+F.
  • LogExpertFree and open source. Follows a log as it grows, like tail, with regular expression search and highlighted lines.
  • Universal File Opener for WindowsOursOpens big logs quickly, with Find, Go to line and Print, and can save edits.

Mac

  • ConsoleBuilt in. Shows the Mac’s live system messages and, under Log Reports, the log files the system and apps keep, with search.
  • TextEditBuilt in. Control-click the log, choose Open With, TextEdit to read it as plain text.

Android

  • Universal File OpenerOursSearches with highlighted matches, jumps to a line, detects the text encoding and offers a hex view for binary content.

In a browser

  • Universal File OpenerOursDrop a log on this page to read and search the whole file, and pick another text encoding if letters look wrong. Nothing is uploaded.

Won’t open?

The log is too big to open

Many editors load the whole file at once and slow down. Use a viewer built for logs, such as LogExpert, drop it on this page, or show only the end in PowerShell: Get-Content app.log -Tail 200 (add -Wait to follow new lines).

Letters are spaced out or garbled

The file uses another encoding, often UTF-16 from Windows PowerShell. Reopen it with the right one: in Visual Studio Code, click the encoding in the status bar; on this page, pick another encoding.

It is full of random characters

Not every .log is text. Windows keeps binary registry transaction logs such as Ntuser.dat.log; they are not meant to be read as text. Inspect one in a hex view, or use the tool of the program that wrote it.

Windows has no error log file to send

Windows records system events in Event Viewer, not in a .log file. For Windows Update, run Get-WindowsUpdateLog in PowerShell; it writes a readable WindowsUpdate.log to your desktop.

Support asked for a log from my Android phone

Android keeps its system log internally. Turn on Developer options, then tap Take bug report; it saves a ZIP whose main file is a text log you can share or open here.

Convert a log file

  • To plain text, from the Windows event logIn Command Prompt, wevtutil qe Application /c:20 /rd:true /f:text prints the 20 newest Application events as plain text.
  • To UTF-8In Visual Studio Code, click the encoding in the status bar, choose Save with Encoding and pick UTF-8.

Log files in our apps

Read and search logs offline on Android and Windows, jump to a line and save edits. On Android, the text encoding is detected, your place is remembered and binary content opens in hex view. Live tailing is not available.

Get it on Google PlayGet it from Microsoft Store
All Android tools and limits for log files
  • Fast open and search with highlighted matches and prev/next navigation.
  • Go-to-line, line operations, sort/join/trim tools when editing.
  • Encoding detection (UTF-8/16, BOMs, Latin-1 fallback) with lossless handling.
  • Hex viewer with hex and ASCII search for binary or mixed files; bookmarks and resume for both views.

Limits

  • Live file tailing and a log-query language are unavailable.

Walkthrough: Edit text, code and data on Android