Skip to content
/ splex Public

Streaming Log Multiplexer - combine multiple logs to one

License

Notifications You must be signed in to change notification settings

kodi/splex

Repository files navigation

Splex

GitHub issues PRs Welcome GitHub commits HitCount XO code style Analytics

MIT license

Instalation

To install globally, do:

npm i -g splex

What is Splex

Need to watch 4 log files?

Tired of doing tail -f log.file in 4 terminal panels/tabs/windows?

Enter Splex

asciicast

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.

Example commands

Basic usage

splex logs/log-0.log logs/path/log.1 logs/path/log.2

custom colors

To have a table-like interface, add -t flag:

splex -t logs/log-0.log logs/log-1.log logs/log-2.log

custom colors

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

custom colors

Monochrome mode is activated by adding -m flag:

splex -tm logs/log-0.log logs/log-1.log logs/log-2.log

.splexrc.json - define list of files per folder

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"
  ]	
}