Skip to main content

A collection of switching log file handlers

Project description

switchinglogfilehandlers

A collection of switching log file handlers for the Python logging system. Unlike the rotating log file handlers in the Python core which always write to a file with a fixed name and peridically rename that, these handlers always open a new file with a unique name - old files will never be renamed.

TimedSwitchingFileHandler

This file handler starts a new file at regular intervals, comparable to the TimedRotatingFileHandler.

TimeoutSwitchingFileHandler

This file handler automatically closes the log file after a period of inactivity (or after the file has been open for some time whichever comes first) and then opens a new file at the next emit.

This is useful for long-running processes where short periods of activity alternate with periods of inactivity. Log switchse will typically occur during inactivity, so each log file will include one complete active period. Also, since the log files are closed, they can be safely compressed or removed.

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

switchinglogfilehandlers-0.0.2.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

switchinglogfilehandlers-0.0.2-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file switchinglogfilehandlers-0.0.2.tar.gz.

File metadata

File hashes

Hashes for switchinglogfilehandlers-0.0.2.tar.gz
Algorithm Hash digest
SHA256 0f7d11deee732d34a0559c2b59e1c1be857d14748c3c00fc27c4b7d01856bfa2
MD5 17a933d73f950b83d7740a84ec860dd5
BLAKE2b-256 f1d7cf3052f46fc42dea0487e5a230f45e949c4061d3b5fc860c646e4917bac4

See more details on using hashes here.

File details

Details for the file switchinglogfilehandlers-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for switchinglogfilehandlers-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 244ff1d54f64252c2c78140ab3ab346fda5e3b6de9d86fb73ea2baabdbc58a40
MD5 80c0d1f734a2c0ab952815e5e204c90d
BLAKE2b-256 b1dd315dae924275c6f2d6572802c7a63f2f3584d903c537607dbb567330eff4

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