Send log entries to Logstalgia using a named pipe

I’m aggregating log sources from multiple locations, aggregating them, ordering them and then sending them to Logstalgia. I’m planning on running a copy of Logstalgia 24/7. Given this scenario using one log file didn’t seem to be the right approach (file would get to big).

You can have Logstalgia listen on STDIN and STDIN to take input from a ‘named pipe’ or FIFO. Information is here: https://en.wikipedia.org/wiki/Named_pipe

To get this working for this scenario:

Setup a FIFO:

mkfifo /tmp/mypipe

Start Logstalgia listening for input on STDIN with things coming to this FIFO piped in:

logstalgia — < /tmp/mypipe &

Cat your custom logfile into the pipe:

cat custom-log-file.log > /tmp/pipe

And voila! This solution will work for a long time using minimal and constant disk space — enjoy!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.