semvec/pypi-packages huggingface dataset:
logmux 0.1.1
Tail multiple log files, label their lines and combine them into one stream
Requires Python: >=3.7, <4
Keywords: logs tail monitoring

# 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

```bash
pip install logmux

```

# Usage

```bash
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:

```bash
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:

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

```

# Similar solutions

In no particular order:

* [MultiTail](https://www.vanheusden.com/multitail/) uses ncurses to tail multiple
  log files in one or more windows. Logmux takes a more simple approach by just
  printing to stdout.
oom 0.1.0
Prevents freezing of your machine when it's running out of RAM
Requires Python: >=3.6

# Out Of ~~Mana~~ Memory

Provides a function that keeps an eye on your RAM and stops executing of the process if you are running out of memory.

## Installation

To install oom enter this in your terminal.

```bash
pip install oom
```

## Usage

### Example 1: The simplest

```python
from oom import exit_on_out_of_ram

one_gigabyte = 1 << 30
exit_on_out_of_ram(one_gigabyte)

# explode your RAM
extremely_big_number = 1 << 9999999
_ = [i for i in range(extremely_big_number)]
```

### Example 2: Full

```python
from oom import exit_on_out_of_ram

one_gigabyte = 1 << 30
exit_on_out_of_ram(
    terminate_on=one_gigabyte,
    warn_on = 2 * one_gigabyte,
    sleep_time=1,
    notify_about_using=True
)

# explode your RAM
extremely_big_number = 1 << 9999999
_ = [i for i in range(extremely_big_number)]
```

### Example 3: Script wrapper

```bash
python3 -m oom -t 1024 examples/for_example_3.py
```