Linux – Using CCZE with multiple log files

bashgnu-screenlinuxlog-files

I am looking for a solution to watch live several logfiles on ccze.

Currently I send a tail of each file in a pipe, this pipe is used by ccze for display all logfiles needed.

The problem is that some log files are much more used than others, ccze don't keep a "fixed position" on the screen, so the most used logs just hide the least used.

I would therefore like to know how to get the set of log files via ccze always visible (I thought of screen but I would like to know if other options exist).

Thanks,

Best Answer

I configure all of my servers to send logs at a level of notice and above to a remote log server, running syslog-ng.

I then configure syslog-ng on the remote server to pipe the console output through ccze as follows:

destination du_pts0 { program("ccze -r > /dev/pts/0"); };

This colorizes the output on the logserver console.

In order to see this on a remote terminal I use:

destination du_fifo { pipe("/var/log/logtail"); };

...and put the following in my ~/.bashrc file:

ccze < /var/log/logtail