lnav in headless mode executes commands before it has finished reading all log files
lnav version lnav 0.12.3
Describe the bug
My log folder contains more than 1K log files (1,3 GB) and lnav takes about a minute to read all the log files.
I have a shell script, which expects the logs folder as argument:
lnav -v -r $1 -c "|export-some-data-to-csv.lnav M RE" -c :quit
The above script works fine.
However, when I use the same script but run lnav in headless mode like this:
lnav -n -v -r $1 -c "|export-some-data-to-csv.lnav M RE" -c :quit
then the commands are executed before lnav has finished reading the log files obviously.
The script is executed without error, but the result only contains a small part of the result, which is produced without headless mode.
To Reproduce Steps to reproduce the behavior:
- Run
lnavvia CLI in headless mode using a command, which retrieves data from all log files in a large logs folder.
Would you be able to run lnav with -d /tmp/lnav-dbg.out so it writes out a debug log and I can take a closer look.
lnav is supposed to scan the available files and read in their data before executing the commands from the command-line. It seems to work for the files I'm testing with. So, some extra details from the debug might help me figure out what is happening.
I'm not able to replicate this with the top-of-tree and without a debug log, it's hard to know what might've happened. Going to close.