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.3.tar.gz (3.6 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.3-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for switchinglogfilehandlers-0.0.3.tar.gz
Algorithm Hash digest
SHA256 a5565c6db99659fa157262d44c782f1a3f14ee0de388c42a3e3288c2cea9179b
MD5 f4fe9ca257291cafdb5df3876d3268bf
BLAKE2b-256 fc7fb792f2a5bc32568c7b462dd9eccc555ddccdfba3b941ca7d86c081ebcac2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for switchinglogfilehandlers-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dc1405970c6221da0c7c3178d8ffce0d99382f4fdcdfc1fa520b5592fd67664e
MD5 e3917e8a55adcc5c04333a8ce2b5555a
BLAKE2b-256 221ee8ab285a56b07c05224d17cb0ba86924ee29139ffd8187860b91a1e7c1ef

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