To install globally, do:
npm i -g splex
Need to watch 4 log files?
Tired of doing tail -f log.file
in 4 terminal panels/tabs/windows?
Enter Splex
Splex is a streaming log multiplexer for node.
Pass in multiple files as aguments, and watch them stream all at once in a single window, nicely color coded by log file, or even separated in table-like format for easier reading.
Basic usage
splex logs/log-0.log logs/path/log.1 logs/path/log.2
To have a table-like interface, add -t
flag:
splex -t logs/log-0.log logs/log-1.log logs/log-2.log
To specify custom colors, eg. alternating yellow and blue:
splex -t -c yellow,blue logs/log-0.log logs/log-1.log logs/log-2.log logs/log-3.log
Monochrome mode is activated by adding -m
flag:
splex -tm logs/log-0.log logs/log-1.log logs/log-2.log
typing splex file_1 file_2 file_X
and then log_2 log_3
in other folder can be tedious and quickly becomes painful and repetitive job.
In order to make your life easier you can create .splexrc.json
file in folder, with path relative to it, then cd
into that folder and just type splex
Here is example content of config file:
{
"files": [
"logs/log-0.log",
"logs/log-1.log",
"logs/log-2.log",
"logs/log-3.log"
]
}