# tstack/lnav

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/tstack-lnav).**

9,630 stars · 376 forks · C++ · bsd-2-clause

## Links

- GitHub: https://github.com/tstack/lnav
- Homepage: http://lnav.org
- awesome-repositories: https://awesome-repositories.com/repository/tstack-lnav.md

## Topics

`command-line-tool` `less` `log-analysis` `log-monitor` `log-viewer` `log-visualization` `logging` `more` `pager` `tail` `terminal` `terminal-pager` `tui`

## Description

lnav is a terminal-based log viewer and analyzer designed for aggregating, filtering, and analyzing multiple log files in a single chronological view. It functions as a console application that can replace the system pager, providing syntax highlighting and document navigation for system or application logs.

The project distinguishes itself by mapping unstructured log data to virtual SQLite tables, enabling the use of SQL and PRQL for structured data analysis, aggregations, and relational queries. It further differentiates its capability set through native integration for retrieving and tailing Docker container logs and the ability to access remote files over SSH without manual downloads.

The tool provides comprehensive observability and analysis features, including chronological log merging, real-time monitoring, and visual analytics such as event distribution charts and numeric field spectrograms. It covers a broad operational surface including structured text formatting for JSON and XML, regex-based format detection, and non-destructive log entry annotation.

The product supports the extraction of compressed archives and provides utilities for sensitive data anonymization and session state export.

## Tags

### Data & Databases

- [Virtual Log Indexing](https://awesome-repositories.com/f/data-databases/sqlite-integration/virtual-log-indexing.md) — Maps unstructured log data to virtual SQLite tables to enable complex relational queries and filtering.
- [Chronological Retrieval](https://awesome-repositories.com/f/data-databases/chronological-retrieval.md) — Enables moving through logs using spatial and chronological navigation, including quick jumps between errors and warnings. ([source](https://docs.lnav.org/en/latest/hotkeys.html))
- [Log Aggregators](https://awesome-repositories.com/f/data-databases/log-aggregators.md) — Merges multiple disparate log streams into a single chronological timeline based on extracted timestamps.
- [Log Stream Merging](https://awesome-repositories.com/f/data-databases/log-stream-merging.md) — Combines multiple log files into a single chronological view using automatic format detection. ([source](https://cdn.jsdelivr.net/gh/tstack/lnav@master/README.md))
- [Pipeline Query Languages](https://awesome-repositories.com/f/data-databases/pipeline-query-languages.md) — Uses a pipeline-based query language to filter logs and preview intermediate result stages in real time. ([source](https://docs.lnav.org/en/latest/sqlext.html))
- [Query Result Visualizers](https://awesome-repositories.com/f/data-databases/query-result-fetching/query-result-visualizers.md) — Renders SQL query outputs in a specialized view with sticky headers and numeric bar charts. ([source](https://docs.lnav.org/en/latest/sqlext.html))
- [Schema-on-the-Fly Generation](https://awesome-repositories.com/f/data-databases/sql-generators/schema-on-the-fly-generation.md) — Generates SQL tables based on log line templates or regular expression searches. ([source](https://docs.lnav.org/en/latest/commands.html))
- [SQL Query Interfaces](https://awesome-repositories.com/f/data-databases/sql-query-interfaces.md) — Runs SQLite statements against loaded logs to filter or analyze data using structured queries. ([source](https://docs.lnav.org/en/latest/hotkeys.html))
- [SQLite Log Analysis](https://awesome-repositories.com/f/data-databases/sqlite-integration/sqlite-log-analysis.md) — Maps log entries to virtual SQLite tables for advanced querying with SQL and PRQL.
- [Virtual Table Querying](https://awesome-repositories.com/f/data-databases/virtual-table-querying.md) — Executes SQL statements against virtual tables to filter and aggregate log data for structured analysis. ([source](https://docs.lnav.org/en/latest/usage.html))
- [Virtual Tables](https://awesome-repositories.com/f/data-databases/virtual-tables.md) — Maps flat log files to relational database schemas on the fly for SQL-based analysis.
- [Bar Charts](https://awesome-repositories.com/f/data-databases/data-analysis-visualization/analytical-platforms-engines/data-analysis-tools/bar-charts.md) — Displays a stacked bar chart of log messages over time, classified by log level. ([source](https://docs.lnav.org/en/latest/ui.html))
- [Three-Dimensional Data Visualizers](https://awesome-repositories.com/f/data-databases/data-analysis-visualization/visualization-frameworks-libraries/data-visualization/three-dimensional-data-visualizers.md) — Creates three-dimensional spectrograms to visualize the frequency of data point values over time. ([source](https://docs.lnav.org/en/latest/ui.html))
- [Log-to-Source Mapping](https://awesome-repositories.com/f/data-databases/data-ingestion-sources/source-metadata-capture/source-tracking/log-to-source-mapping.md) — Highlights log messages originating from specific source file locations and enables jumping between hits. ([source](https://docs.lnav.org/en/latest/usage.html))
- [Distribution Histograms](https://awesome-repositories.com/f/data-databases/data-management/unique-identifier-generators/uniqueness-enforcement/distribution-histograms.md) — Generates frequency histograms of log messages over time to identify activity spikes. ([source](https://cdn.jsdelivr.net/gh/tstack/lnav@master/README.md))
- [Numeric Field Spectrograms](https://awesome-repositories.com/f/data-databases/frequency-analyzers/spectrogram-generation/numeric-field-spectrograms.md) — Generates a spectrogram to visualize the distribution of values within a numeric log message field. ([source](https://docs.lnav.org/en/latest/commands.html))
- [Annotation Persistence Layers](https://awesome-repositories.com/f/data-databases/local-persistence-layers/annotation-persistence-layers.md) — Stores user notes and tags in a separate metadata store to avoid modifying original log files.
- [Log Event Summarization](https://awesome-repositories.com/f/data-databases/log-event-summarization.md) — Summarizes common message formats and counts events within time slices to identify operational trends. ([source](https://docs.lnav.org/en/latest/sqlext.html))
- [Structured Data Formatters](https://awesome-repositories.com/f/data-databases/structural-data-validators/structured-data-formatters.md) — Beautifies and visualizes structured data formats like JSON, YAML, and XML within a terminal interface.
- [Structured Text Pretty-Printing](https://awesome-repositories.com/f/data-databases/text-processing-utilities/text-inspection-tools/structured-text-pretty-printing.md) — Pretty-prints and parses JSON, XML, and YAML logs to improve human readability in the terminal.
- [Cross-Database Querying](https://awesome-repositories.com/f/data-databases/virtual-table-querying/cross-database-querying.md) — Connects external SQLite database files to the current session to perform complex cross-database queries. ([source](https://docs.lnav.org/en/latest/sqlext.html))

### System Administration & Monitoring

- [Log Analysis](https://awesome-repositories.com/f/system-administration-monitoring/logging-and-telemetry/log-analysis.md) — Provides a high-performance terminal interface for viewing and filtering large volumes of system and application logs.
- [Terminal Log Analyzers](https://awesome-repositories.com/f/system-administration-monitoring/logging/terminal-log-analyzers.md) — Provides a terminal-based interface for real-time log inspection, pattern matching, and diagnostic analysis.
- [Distributed Log Aggregation](https://awesome-repositories.com/f/system-administration-monitoring/distributed-log-aggregation.md) — Merges multiple log files from disparate sources into a single, unified chronological view.
- [Error Indexing](https://awesome-repositories.com/f/system-administration-monitoring/error-indexing.md) — Builds an index of problematic log entries and provides shortcuts to jump between errors and warnings. ([source](https://cdn.jsdelivr.net/gh/tstack/lnav@master/README.md))
- [Log Aggregation](https://awesome-repositories.com/f/system-administration-monitoring/log-aggregation.md) — Aggregates multiple log files into a single console interface to streamline issue analysis. ([source](https://docs.lnav.org))
- [Log Entry Inspection](https://awesome-repositories.com/f/system-administration-monitoring/log-entry-inspection.md) — Provides an overlay to inspect timestamps, individual fields, and permalinks for any specific log message. ([source](https://docs.lnav.org/en/latest/ui.html))
- [Log File Tailing](https://awesome-repositories.com/f/system-administration-monitoring/log-file-tailing.md) — Continuously tails active log files and Docker containers to monitor system behavior in real-time. ([source](https://lnav.org/))
- [Log Message Filtering](https://awesome-repositories.com/f/system-administration-monitoring/log-message-filtering.md) — Allows hiding or showing log messages based on defined criteria and toggling the active state of filters. ([source](https://docs.lnav.org/en/latest/hotkeys.html))
- [SQL-Based Log Analysis](https://awesome-repositories.com/f/system-administration-monitoring/log-querying-interfaces/log-query-engines/sql-based-log-analysis.md) — Uses SQLite and PRQL to perform structured data analysis and aggregations on unstructured log files.
- [Execution Timeline Visualizers](https://awesome-repositories.com/f/system-administration-monitoring/execution-path-visualization/thread-execution-state-visualizers/execution-timeline-visualizers.md) — Maps operations, threads, and tags on a timeline to track process flow across multiple log files. ([source](https://docs.lnav.org/en/latest/ui.html))
- [Log Annotations](https://awesome-repositories.com/f/system-administration-monitoring/log-annotations.md) — Attaches notes, comments, or partition names to specific log lines to mark significant events. ([source](https://docs.lnav.org/en/latest/commands.html))
- [Temporal Log Filters](https://awesome-repositories.com/f/system-administration-monitoring/log-ingestion/temporal-log-filters.md) — Provides capabilities to restrict the displayed log entries to specific time ranges or durations. ([source](https://docs.lnav.org/en/latest/usage.html))
- [Container Log Streamers](https://awesome-repositories.com/f/system-administration-monitoring/log-streaming/container-log-streamers.md) — Provides native integration to retrieve and tail logs directly from Docker containers. ([source](https://docs.lnav.org/en/latest/usage.html))
- [Log Entry Annotations](https://awesome-repositories.com/f/system-administration-monitoring/logging-and-telemetry/log-analysis/log-entry-annotations.md) — Attaches tags and formatted comments to log messages without modifying the original files. ([source](https://docs.lnav.org/en/latest/usage.html))
- [Remote Logging Utilities](https://awesome-repositories.com/f/system-administration-monitoring/remote-logging-utilities.md) — Opens and tails log files located on remote machines via secure SSH tunnels. ([source](https://docs.lnav.org/en/latest/commands.html))

### DevOps & Infrastructure

- [Log Processing Pipelines](https://awesome-repositories.com/f/devops-infrastructure/log-processing-pipelines.md) — Processes log data through sequential stages of filtering and transformation using a dedicated query language.
- [Docker Log Management](https://awesome-repositories.com/f/devops-infrastructure/docker-log-management.md) — Provides native integration for retrieving and tailing Docker container logs via dedicated URL schemes.
- [Remote Log Streaming](https://awesome-repositories.com/f/devops-infrastructure/execution-environments/remote-workspace-command-execution/ssh-based-remote-execution/remote-log-streaming.md) — Streams remote file content over an SSH tunnel for real-time viewing via a specialized helper.

### Software Engineering & Architecture

- [Custom Log Formatting](https://awesome-repositories.com/f/software-engineering-architecture/custom-log-formatting.md) — Creates configuration files to parse non-standard log structures and display specific extracted fields. ([source](https://docs.lnav.org/en/latest/formats.html))
- [Automatic Format Detection](https://awesome-repositories.com/f/software-engineering-architecture/custom-log-formatting/automatic-format-detection.md) — Identifies file formats and unpacks compressed archives on the fly to display content. ([source](https://lnav.org/))
- [Log Parsing](https://awesome-repositories.com/f/software-engineering-architecture/custom-log-formatting/log-parsing.md) — Interprets various log structures using a library of built-in or user-defined format definitions. ([source](https://docs.lnav.org/en/latest/formats.html))
- [Regex-Based Parsers](https://awesome-repositories.com/f/software-engineering-architecture/syntax-parsing-engines/regex-based-parsers.md) — Uses a library of regular expression patterns to automatically identify and parse structured log data.
- [Format Overrides](https://awesome-repositories.com/f/software-engineering-architecture/custom-log-formatting/format-overrides.md) — Overrides specific regex patterns and settings for existing log formats without modifying original configurations. ([source](https://docs.lnav.org/en/latest/formats.html))

### Artificial Intelligence & ML

- [Regex Data Extraction](https://awesome-repositories.com/f/artificial-intelligence-ml/data-indexing/schema-less/value-extraction/regex-data-extraction.md) — Captures values from strings using regular expressions and returns them as relational tables or objects. ([source](https://docs.lnav.org/en/latest/sqlext.html))

### Part of an Awesome List

- [Structured Log Parsing](https://awesome-repositories.com/f/awesome-lists/data/xml-parsing/structured-log-parsing.md) — Extracts data from logfmt, JSON, XML, or YAML strings into structured formats for better analysis. ([source](https://docs.lnav.org/en/latest/sqlext.html))

### Development Tools & Productivity

- [Location Jumpers](https://awesome-repositories.com/f/development-tools-productivity/command-line-navigation/location-jumpers.md) — Allows jumping to specific line numbers, file percentages, timestamps, or anchors within logs. ([source](https://docs.lnav.org/en/latest/commands.html))
- [Command Piping](https://awesome-repositories.com/f/development-tools-productivity/command-piping.md) — Sends focused or marked log lines to external shell commands for further processing. ([source](https://docs.lnav.org/en/latest/commands.html))
- [Remote File Management](https://awesome-repositories.com/f/development-tools-productivity/remote-file-management.md) — Enables opening and tailing of files on remote machines via SSH directly within the terminal interface. ([source](https://docs.lnav.org/en/latest/usage.html))
- [Shell Command Execution](https://awesome-repositories.com/f/development-tools-productivity/shell-command-execution.md) — Executes system shell commands and captures their output directly within the query interface. ([source](https://docs.lnav.org/en/latest/sqlext.html))
- [Terminal Pagers](https://awesome-repositories.com/f/development-tools-productivity/terminal-pagers.md) — Acts as a high-performance system pager replacement with integrated syntax highlighting and document navigation.
- [Terminal Text Highlighting](https://awesome-repositories.com/f/development-tools-productivity/terminal-text-highlighting.md) — Applies colors to log message fragments that match specified regular expressions. ([source](https://docs.lnav.org/en/latest/commands.html))

### Operating Systems & Systems Programming

- [Terminal Pagers](https://awesome-repositories.com/f/operating-systems-systems-programming/terminal-command-line-environments/terminal-pagers.md) — Functions as a high-performance replacement for the system pager with syntax highlighting and navigation. ([source](https://docs.lnav.org/en/latest/usage.html))

### User Interface & Experience

- [Structured Text Pretty-Printing](https://awesome-repositories.com/f/user-interface-experience/structured-text-pretty-printing.md) — Pretty-prints JSON-lines and other structured text formats for improved human readability. ([source](https://cdn.jsdelivr.net/gh/tstack/lnav@master/README.md))
- [Column Summarizers](https://awesome-repositories.com/f/user-interface-experience/tables/column-reorderers/column-summarizers.md) — Computes statistical characteristics of values within a specific database column using SQL. ([source](https://docs.lnav.org/en/latest/commands.html))
