tstack / lnav

Log file navigator
http://lnav.org
BSD 2-Clause "Simplified" License
7.83k stars 312 forks source link

doc: custom log config files need to end in `_log.json` not just `.json` #1307

Open corneliusroemer opened 2 weeks ago

corneliusroemer commented 2 weeks ago

I struggled to find out why I couldn't get SQL queries to work on my otherwise functioning custom log file.

When trying out another custom log file from a PR I realized that my file was called postgresCustom.json and all other log files were ending in _log.json (mine wasn't).

When I added the magic _log.json SQL finally started working!

Mentioning this in the docs is a good start. It would be even better if this was validated and logged in the debug logs.

For example, I created the custom config via the regex101 importer like this:

lnav -m regex101 import https://regex101.com/r/5CZxWI/1 postgresCustom

The importer should have either complained that I must end the file name in _log, e.g. postgresCustom_log, or it should have simply appended that _log suffix.