Skip to content

Latest commit

 

History

History
138 lines (102 loc) · 4.22 KB

README.md

File metadata and controls

138 lines (102 loc) · 4.22 KB

simbashlog-matrix-notifier: simbashlog-notifier for matrix.org

GPL-3.0 License

Description

This is a simbashlog-notifier for Matrix.

It summarizes the log messages and sends them to a Matrix room.
End-to-end encryption is supported.

Example message

Example message

Getting Started

It is possible that pip is not yet installed. If this is not the case, you will be prompted to install it. Confirm the installation.

Installation with pip (GitHub)

pip install git+https://github.com/fuchs-fabian/simbashlog-matrix-notifier

Installation with pip (Local)

Download the repository and navigate to the directory containing the setup.py file.

pip install .

Check Installation

pip list
pip show simbashlog-matrix-notifier

Configuration

After installation, you will find the configuration file under:

~/.config/simbashlog-notifier/simbashlog-matrix-notifier/config.json

This configuration file is used by default if no other custom configuration file is specified.

It looks as follows:

{
    "min_required_log_level": "6",
    "show_in_console_sent_message": "true",
    "show_in_header_pid": "false",
    "show_in_body_log_file_result": "false",
    "show_in_body_log_file_content": "false",
    "show_in_body_summary_for_pid": "false",
    "show_in_body_summary_for_log_file": "false",
    "show_in_footer_log_file_names": "false",
    "show_in_footer_host": "false",
    "show_in_footer_notifier_name": "true",
    "use_e2e": "true",
    "room_id": "!xyz:matrix.org",
    "access_token": "your_access_token_here",
    "homeserver_url": "https://matrix-client.matrix.org"
}

Usage

usage: simbashlog-matrix-notifier [-h] [--config CONFIG] [--pid PID] [--log-level LOG_LEVEL] [--message MESSAGE]
                                  [--log-file LOG_FILE] [--json-log-file JSON_LOG_FILE]

Notifier for simbashlog.

options:
  -h, --help            show this help message and exit
  --config CONFIG       Path to a custom config file.
  --pid PID             The used process ID.
  --log-level LOG_LEVEL
                        The used log level (sourced simbashlog) / severity number (simbashlog called with arguments).
  --message MESSAGE     The logged message (simbashlog called with arguments).
  --log-file LOG_FILE   The created *.log file.
  --json-log-file JSON_LOG_FILE
                        The created *_log.json file.

Uninstallation

pip uninstall simbashlog-matrix-notifier

Bugs, Suggestions, Feedback, and Needed Support

If you have any bugs, suggestions or feedback, feel free to create an issue or create a pull request with your changes.

Support simbashlog

If you like simbashlog's ecosystem, you think it is useful and saves you a lot of work and nerves and lets you sleep better, please give it a star and consider donating.

Donate with PayPal

This script is a component of simbashlog (LICENSE).

The core of this notifier is simbashlog-notify-helper-py (LICENSE).

Copyright (C) 2024 Fabian Fuchs