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.3.0.tar.gz (8.2 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.3.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dailylog1-0.3.0.tar.gz
  • Upload date:
  • Size: 8.2 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.3.0.tar.gz
Algorithm Hash digest
SHA256 cc165c4480d1034d3fff926649be24da56a246b6fe364d10f47f5cb1a9261f0b
MD5 ee4c8523c810f9c40961e6beee384f4c
BLAKE2b-256 572459a451ce5044fbd2a288e49405c5c7de20bbbd87fe29034be22a72fd021d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dailylog1-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 daf1ef55eda7c0c8c24c0b29c1ed91e3223c9d896ca8fbc98183be257b4b9eba
MD5 0e4902aaa9ac8005d9e9e72db22de044
BLAKE2b-256 7b57c5267dc27e452bdbec4385372eeb2785a8d8cdeb309e70e58298f45832e6

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