Metadata-Version: 2.4
Name: machine-log-monitor
Version: 0.1.1
Summary: Monitor live log text from CAN, serial, and CAN trace sources.
Author-email: Janosch Meyer <janosch.code@proton.me>
License-Expression: MIT
Keywords: can,can-bus,ecu,embedded,logging,monitor,rs232,serial,uart
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Win32 (MS Windows)
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Manufacturing
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Embedded Systems
Classifier: Topic :: System :: Logging
Classifier: Topic :: System :: Monitoring
Classifier: Topic :: Terminals :: Serial
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: THIRD_PARTY_LICENSES.md
Requires-Dist: PySide6<7,>=6
Requires-Dist: python-can<5,>=4
Requires-Dist: pyserial<4,>=3.5
Provides-Extra: audit
Requires-Dist: pip-audit; extra == "audit"
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: ruff==0.16.*; extra == "dev"
Dynamic: license-file

# MachineLogMonitor

MachineLogMonitor is a PySide6 desktop application for observing live text logs from CAN, RS232, and CAN trace files. It only reads: no CAN frame and no serial byte is sent from application code — the source layer contains no send or write call, enforced by a test. On CAN, listen-only mode is requested where the backend supports it.

## Features

- Monitor exactly one selected source: a CAN bus, an RS232 serial port, or a CAN trace file
- Receive-only by design — no send or write call exists in the source layer
- Multiple filtered monitor views over one shared ring buffer; pause and clear per view without losing incoming data
- Configurable substring rules that color lines as DEBUG, INFO, WARN, and ERROR
- Optional logging to disk: raw stream and per-monitor files, written while a source is connected
- Trace playback at 0.5×, 1×, 2×, 10×, or instant speed
- RS232 sources accept pyserial URLs (for example `socket://host:port`) in addition to COM port names
- JSON configuration with safe defaults: missing keys are restored, a malformed file is never overwritten until an explicit save
- Optional dependency vulnerability scan on the About page via `pip-audit`

## Installation

Requires Python 3.10 or newer. Developed and tested primarily on Windows.

```powershell
pip install machine-log-monitor
```

As a standalone application, installing with [pipx](https://pipx.pypa.io/) keeps it in its own environment and puts the `machine-log-monitor` command on the PATH:

```powershell
pipx install machine-log-monitor
```

Connecting to a source additionally needs a CAN backend, a serial device, or a supported CAN trace file.

## Usage

Run `machine-log-monitor` to launch the application:

```powershell
machine-log-monitor
machine-log-monitor --config .\monitor.json
```

The application opens on the **Monitors** page. Configure and select a source under **Data source**, then choose **Connect**. Add, edit, or remove filtered views on **Log monitors**; **Pause** and **Clear** affect only the selected view, not the incoming buffer. Enable **Log file** to also write the received stream to disk.

On **General**, set the substrings used for DEBUG, INFO, WARN, and ERROR coloring; empty substrings disable that rule. Save settings with **File → Save** or **Save as…** as a JSON file that can be passed back via `--config`.

The optional audit extra (`pip install machine-log-monitor[audit]`, or `pipx install "machine-log-monitor[audit]"`) enables the background `pip-audit` scan on the **About** page.

## License

MIT — see the LICENSE file shipped with the package. Third-party components (PySide6, python-can, pyserial, bundled fonts) keep their own licenses; see THIRD_PARTY_LICENSES.md in the source distribution.

MachineLogMonitor is a diagnostic viewer and not intended for safety-critical use.

This project was created with the assistance of artificial intelligence.
