Better LogVS Code extension for viewing structured JSON log files (
FeaturesSyntax HighlightingAutomatically highlights key fields in JSON log lines:
Timestamp HoverHover over an Open as JSONJSON log lines have a { } Open as JSON CodeLens action. Click it to open the line as a formatted JSON document in a side panel. The tab is named after the timestamp of the entry for easy navigation between multiple open entries. Re-clicking the same line reuses the existing tab instead of opening a duplicate. Non-JSON lines do not show the CodeLens button. Share JSON as FileWhen viewing a JSON preview tab, click the share icon in the editor title bar (or run Better Log: Share JSON as File from the Command Palette) to export the formatted JSON to a temporary file and reveal it in your system file manager. Useful for dragging the file into messengers or other apps that don't handle long pasted text well. Source Line HighlightingWhen you switch to a JSON tab opened from a log entry, the original line in the Toggle On/OffYou can enable or disable all Better Log features (highlighting, hover tooltips, code lenses) without uninstalling the extension:
The current state is stored in the Supported Log FormatThe extension works with
This format is compatible with ECS (Elastic Common Schema), Pino, Bunyan, and other structured logging libraries. InstallationSearch for better-log in the VS Code Extensions panel ( |
