Skip to main content

Tail multiple log files, label their lines and combine them into one stream

Project description

logmux

Logmux tails multiple log files, labels their lines and outputs everything in one stream - Much like docker-compose, but simply for local log files!

Installation

pip install logmux

Usage

logmux first.log second.log test/third.log

This will tail all three log files. New lines will be prefixed with the name of the log file it came from, e.g. first: for the first log file and third: for the last one.

You can customize the labels by providing them as a query parameter for each file:

logmux "first.log?label=custom" second.log test/third.log

This will prefix all lines from the first file with custom: . You'll need to quote the argument like in this example to make sure that your shell is not going to split it.

It's also possible to set the color of the label:

logmux "first.log?label=custom&color=blue" "second.log?color=red" test/third.log

Similar solutions

In no particular order:

  • MultiTail uses ncurses to tail multiple log files in one or more windows. Logmux takes a more simple approach by just printing to stdout.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

logmux-0.1.1.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

logmux-0.1.1-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page