No project description provided
Project description
dailylog
Overview
I have many scripts run by cron and report errors via cron's email. This is great until one of the scripts that runs frequently starts failing. Rather than waking to a full mailbox, using this tool will throttled specific errors to a log and only show the error every 24 hours by default. The time can be adjusted by passing a parameter.
Installation
Check out this repo and cd into the project directory and run:
pip install dailylog1
Usage
dailylog --help
Usage: dailylog [OPTIONS] COMMAND [ARGS]...
Entry point for click script.
Options:
-C, --cache TEXT specify alternate cache file (default ~/.cache/dailylog.json)
-c, --config TEXT specify alternate config file (default ~/.config/dailylog.yaml)
-d, --debug increment debug level
-t, --test / --no-test specify test mode
-v, --verbose increment verbosity level
-V, --version show version and exit
-h, --help Show this message and exit.
Commands:
log Log an error.
set-default-log Set a new default log.
dailylog log --help
Usage: dailylog log [OPTIONS]
Log a message.
Options:
-k TEXT Specify key [required]
-m TEXT Specify message [required]
-s INTEGER Specify seconds to suppress (default 86400 [one day])
-l INTEGER Specify one of logging levels (default: logging.ERROR)
-f TEXT Specify alternate log file
-h, --help Show this message and exit.
dailylog set-default-log --help
Usage: dailylog set-default-log [OPTIONS] LOG_FN
Set a new default log.
Options:
-h, --help Show this message and exit.
Documentation
License
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
dailylog1-0.2.0.tar.gz
(8.3 kB
view details)
Built Distribution
File details
Details for the file dailylog1-0.2.0.tar.gz
.
File metadata
- Download URL: dailylog1-0.2.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.9.3-76060903-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ea3e5f341145483d896433a1a2a82c6414a12db4e303c847f8f4137b1f81d93 |
|
MD5 | 82121eacb37a81bf6f78397ce16c7705 |
|
BLAKE2b-256 | 3486901c524d8a3c246df46210afbacb156d0ea2e51dd9368e6051cffab4de93 |
File details
Details for the file dailylog1-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: dailylog1-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.9.3-76060903-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 334dc17d9f4f2339e5acfcbb8cb51fddd3f56159e085164e1a4ff246bb7ba760 |
|
MD5 | da4fe1def453f2541da42545854fc77f |
|
BLAKE2b-256 | a1bd237e985e63cd5343bfea184403c775530afb4b25b17d41a58e92f1e4ad48 |