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.1.7.tar.gz
(8.2 kB
view hashes)
Built Distribution
Close
Hashes for dailylog1-0.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ea5cb3907cb2ad6dda2972503acdde7acf70a4dff323c8a322f2b46a8c4b908 |
|
MD5 | 99cd6c5d19e4e5d6801c9f582f9131d8 |
|
BLAKE2b-256 | 8f18fd0a0f25f0621cd0df5dfad73cb266cbb28a048a8629d3070166184fb0fd |