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.4.tar.gz (4.2 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.4-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for switchinglogfilehandlers-0.0.4.tar.gz
Algorithm Hash digest
SHA256 28f11d87883c75bce3654c8494503229850dad40c104281c4b08e293007007e4
MD5 e37085af616890900a85dbe032b85de5
BLAKE2b-256 d751c618de3a7f327a6e550765ff7d2da49a860f07d676f65ebbbbce11f4a2c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for switchinglogfilehandlers-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4638080457fbbd6c036924913ff5642163aceca403027a232db9fb6eff48ea46
MD5 5cb59b8feba88d3815d390fb452bba14
BLAKE2b-256 a133de7b92cd4e7476764a9ed126b255e9617cf9ae6ff4fa3b7abae96fbe04d1

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