Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

log-throttling

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

log-throttling

A python log throttling utility

  • 0.0.3
  • PyPI
  • Socket score

Maintainers
1

log-throttling

A light-weight python log throttling utility

import time
import logging
import log_throttling

logger = logging.getLogger(__name__)

start = time.monotonic()
while time.monotonic() - start < 10:
    log_throttling.by_time(logger, interval=1).info(
        "This line will be logged once every second."
    )
    time.sleep(0.01)

for i in range(100):
    log_throttling.by_count(logger, once_every=10).info(
        "This line will only log values that are multiples of 10: %s", i
    )

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc