Skip to main content

Logging utility to help reduce email traffic

Project description

dailylog

Build Status codecov Python Version wemake-python-styleguide

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

MIT

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.2.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dailylog1-0.2.2-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file dailylog1-0.2.2.tar.gz.

File metadata

  • Download URL: dailylog1-0.2.2.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.13.2 Linux/6.12.13-200.fc41.x86_64

File hashes

Hashes for dailylog1-0.2.2.tar.gz
Algorithm Hash digest
SHA256 4967ffd15c2cab7d98e8bcb754f597eb92cc37d896a4b1f09f60e1247fdc04cc
MD5 730753ba2cb82ff0a3f413c6f28ed097
BLAKE2b-256 29a87ccebd2c761600f708f70e4fde5f3d2ab8419504d32e3579eaf556a592ce

See more details on using hashes here.

File details

Details for the file dailylog1-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: dailylog1-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.13.2 Linux/6.12.13-200.fc41.x86_64

File hashes

Hashes for dailylog1-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 aa8a8450c2e9bae56d9a6e3f34fd74166aff769cf7ab0e824c24ae3e5ce9de44
MD5 82051ede4695b13b760251488b7942a1
BLAKE2b-256 a23dfc0ba1dc8a9aaa38c6386145c9dcf10957320d390ca964d5fc778da7a735

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page