Hacker News new | ask | show | jobs
by tstack 4092 days ago
Yes, log messages from different files are interleaved based on their timestamps.
1 comments

Any facility for piping, for example to route an adb logcat (live remote log tail from android) through it?

Of course, I could redirect the adb logcat output to a file and point this at that, but it'd be nice to have the sugar to not have to explicitly wrap the process.

You can pipe into lnav like you can with less/more:

  make |& lnav
The '-t' option will prepend timestamps to the lines that are coming in on stdin so that it will be treated as a log file. The '-w <file>' option will write the stdin data to a file if you want to look at it later:

  make |& lnav -t -w /tmp/make.out
Is that what you're asking about?
Sure is. Sounds great!