twilight ventures

open a large log file in the editor

A .log file is what a service leaves behind, one line per event, until it is longer than any text editor wants to load. Rotation splits it into a set, app.log for the newest lines and app.log.1, app.log.2 and up for the older ones, the oldest often gzipped to .log.gz. A line is plain text, a JSON object or logfmt pairs.

in a jetbrains ide

Install Log Lens from the JetBrains Marketplace; it runs in IntelliJ IDEA, PyCharm and every IntelliJ-based IDE from 2024.2 on. Every .log, .log.N and .log.gz file then gets a Log Lens tab beside the regular editor, which is never taken over. A .txt or .out file stays where it was. Lines are indexed by byte offset in the background, so the log opens at once, and a .log.gz is decompressed to a temporary file first.

in vs code

Install Log Lens for VS Code from Open VSX or the Visual Studio Marketplace; it runs on VS Code 1.90 or newer. The text editor stays the tab that opens first: Log Lens is the Open With choice on the file and the Open in Log Lens command, on the same names the plugin claims. Lines are indexed by byte offset in one pass, and a .log.gz is unpacked once to a temp file that goes when the tab closes.

what you see

The log is a table, and the format is read from the file itself, plain text, JSON lines or logfmt. When the level pass finishes, the chips over it carry whole-file counts of ERROR, WARN, INFO, DEBUG and TRACE, and one click narrows the view to a level. Find in file searches every line with a match count and a next and previous jump; the extension also takes a regular expression, with Matches only to page through the hits. A selected line goes whole into the line detail, and an ANSI line shows in its colors. The extension pretty-prints a JSON line there, and its Statistics tab gives the line count, the size and the level counts.

Log Lens in IntelliJ IDEA: level chips with counts above a paged log and a detail pane
gateway.log in IntelliJ IDEA: ERROR 147, WARN 268, INFO 1,605 and DEBUG 580 on the chips, page 1 of 30, one line open in the detail pane.

what the plugin has that the extension does not

Follow mode tails the file as it grows, through a rotation; in VS Code the tab shows the file as it was when it opened, and a close and reopen reads the lines written since. Jump to source links a stack-trace line into your project. Encoding detection opens an EUC-KR, Shift_JIS or Windows-1250 log with its letters intact, where the extension reads every file as UTF-8.

free, and what Pro adds

Reading is free, and neither side calls the network to read. The paid tiers differ in shape: the JetBrains plugin is a subscription with a 30-day trial, while the VS Code extension takes one key bought once, after a 14-day trial on each machine, and that key also serves JSONL Lens and Parquet Lens for VS Code. Pro on both sides adds whole-file filter queries, export to .log, JSONL or CSV (Parquet as well from the plugin), log statistics (the time span and the activity histogram over the free counts) and kept themes; the plugin also follows a filter live.

What is free in 0.1.0 of the extension stays free in every later build; we add to Pro and take nothing away.