Skip to main content

No project description provided

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

Uploaded Source

Built Distribution

dailylog1-0.1.8-py3-none-any.whl (9.6 kB view hashes)

Uploaded Python 3

Supported by

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