Skip to main content

Watch and upload log files to log.fit

Project description

PyPI Python Versions

Drone

The LogFit daemon watches log files and sends data to the LogFit app for analysis.

Installation

TODO

Usage

# Start in foreground mode
python3 logfit/client.py [run|foreground]

# Start in daemon mode
python3 logfit/client.py start

# Stop daemon
python3 logfit/client.py stop

# Restart the daemon
python3 logfit/client.py restart

# Get the daemon status
python3 logfit/client.py status

Configuration

The daemon can read from a logfit_config.yaml config file of the format:

# Required: Get this from your log.fit account
source: "64a4b9bd88f14511926e0de86f23e2d8"

# Optional: The directory the daemon will watch
watch_directory: "/var/log/"

# Optional: Minimum log level.  Possible options are
# critical, error, warning, info, and debug
log_level: "warning"

# Optional: File to write daemon logs to
log_file: "logfit.log"

# Optional: limit watching log files to given mime types
allowed_mime_types:
- text/plain
- inode/x-empty

# Optional: List of file globs to not watch, should be the
# full absolute path
ignore_paths: []

Development

python setup.py develop
pip install -r requirements-test.txt
flake8
coverage run -m unittest
coverage report -m

Publishing

# Publish to PyPI
python setup.py sdist bdist_wheel
twine upload dist/*

# Generate binaries for multiple operating systems
pyinstaller logfit/main.py -F -p logfit --hidden-import queue -n logfit_linux_x86_64
pyinstaller logfit/main.py -F -p logfit --hidden-import queue -n logfit_macos_x86_64
pyinstaller logfit/main.py -F -p logfit --hidden-import queue -n logfit_windows_x86_64

# Copy binaries into logfit-daemon-binary

Project details


Download files

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

Files for logfit, version 1.1.1
Filename, size File type Python version Upload date Hashes
Filename, size logfit-1.1.1-py3-none-any.whl (8.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size logfit-1.1.1.tar.gz (8.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page