The logs are alive, but you can’t see their heartbeat until you open the right door. Lnav debug logging access is that door. It lets you see the raw, unfiltered flow of what Lnav is doing under the hood. Every parse, every query, every error—documented in real time. No guessing. No blind spots.
Lnav (Logfile Navigator) works best when you go beyond the basic views. Debug logging access gives you full insight into its internal operations. With it, you can track how log files are read and indexed, observe SQL query plans, and verify regex matches across multiple sources. This is crucial when troubleshooting complex data pipelines or verifying that custom formats are parsed correctly.
To enable Lnav debug logging, launch the tool with the -d flag followed by a directory path where logs should be written. Example:
lnav -d /tmp/lnav-debug/
This creates granular log output files inside the specified path. Each session’s logs are separate, letting you compare behavior changes over time. Rotate these logs to avoid excessive disk use.